vscode-pug-languageservice
Advanced tools
Comparing version 0.29.4 to 0.29.5
@@ -23,2 +23,3 @@ import type * as html from 'vscode-html-languageservice'; | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}; | ||
@@ -41,2 +42,3 @@ doComplete: (pugDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, pos: import("vscode-languageserver-protocol").Position, documentContext: html.DocumentContext, options?: html.CompletionConfiguration | undefined) => Promise<html.CompletionList | undefined>; | ||
@@ -59,2 +61,3 @@ findDocumentHighlights: (pugDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, pos: import("vscode-languageserver-protocol").Position) => html.DocumentHighlight[] | undefined; | ||
@@ -77,2 +80,3 @@ findDocumentLinks: (pugDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, docContext: html.DocumentContext) => html.DocumentLink[]; | ||
@@ -95,2 +99,3 @@ findDocumentSymbols: (pugDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}) => import("vscode-languageserver-protocol").SymbolInformation[]; | ||
@@ -113,2 +118,3 @@ doHover: (docDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, pos: import("vscode-languageserver-protocol").Position) => import("vscode-languageserver-protocol").Hover | undefined; | ||
@@ -131,2 +137,3 @@ createScanner: (pugDoc: { | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, initialOffset?: number) => { | ||
@@ -157,3 +164,22 @@ scan: () => html.TokenType; | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}, posArr: import("vscode-languageserver-protocol").Position[]) => import("vscode-languageserver-protocol").SelectionRange[]; | ||
getFoldingRanges: (pugDoc: { | ||
pugTextDocument: html.TextDocument; | ||
htmlTextDocument: html.TextDocument; | ||
htmlDocument: html.HTMLDocument; | ||
pugCode: string; | ||
htmlCode: string; | ||
sourceMap: import("@volar/source-map").SourceMap<{ | ||
isEmptyTagCompletion: boolean; | ||
} | undefined>; | ||
error: { | ||
code: string; | ||
msg: string; | ||
line: number; | ||
column: number; | ||
filename: string; | ||
} | undefined; | ||
ast: import("./pugDocument").Node | undefined; | ||
}) => import("vscode-languageserver-protocol").FoldingRange[]; | ||
}; |
@@ -12,2 +12,3 @@ "use strict"; | ||
const selectionRanges_1 = require("./services/selectionRanges"); | ||
const foldingRanges_1 = require("./services/foldingRanges"); | ||
function getLanguageService(htmlLs) { | ||
@@ -23,2 +24,3 @@ return { | ||
getSelectionRanges: (0, selectionRanges_1.register)(htmlLs), | ||
getFoldingRanges: (0, foldingRanges_1.register)(), | ||
}; | ||
@@ -25,0 +27,0 @@ } |
@@ -21,2 +21,47 @@ import * as SourceMap from '@volar/source-map'; | ||
} | undefined; | ||
ast: Node | undefined; | ||
}; | ||
export declare type Node = BlockNode | TagNode | TextNode | CommentNode | BlockCommentNode; | ||
export declare type BlockNode = { | ||
type: 'Block'; | ||
nodes: Node[]; | ||
line: number; | ||
}; | ||
export declare type TagNode = { | ||
type: 'Tag'; | ||
name: string; | ||
selfClosing: boolean; | ||
block: BlockNode; | ||
attrs: { | ||
name: string; | ||
val: string | true; | ||
line: number; | ||
column: number; | ||
mustEscape: boolean; | ||
}[]; | ||
attributeBlocks: {}[]; | ||
isInline: boolean; | ||
line: number; | ||
column: number; | ||
}; | ||
export declare type TextNode = { | ||
type: 'Text'; | ||
val: string; | ||
line: number; | ||
column: number; | ||
}; | ||
export declare type CommentNode = { | ||
type: 'Comment'; | ||
val: string; | ||
buffer: boolean; | ||
line: number; | ||
column: number; | ||
}; | ||
export declare type BlockCommentNode = { | ||
type: 'BlockComment'; | ||
block: BlockNode; | ||
val: string; | ||
buffer: boolean; | ||
line: number; | ||
column: number; | ||
}; |
@@ -20,2 +20,3 @@ "use strict"; | ||
let attrsBlocks; | ||
let ast; | ||
try { | ||
@@ -25,3 +26,3 @@ const tokens = pugLex(pugCode, { filename: fileName }); | ||
attrsBlocks = collectAttrsBlocks(tokens); | ||
const ast = pugParser(tokens, { filename: fileName, src: pugCode }); | ||
ast = pugParser(tokens, { filename: fileName, src: pugCode }); | ||
visitNode(ast, undefined); | ||
@@ -62,2 +63,3 @@ // support tag auto-complete in empty lines | ||
error, | ||
ast, | ||
}; | ||
@@ -64,0 +66,0 @@ function visitNode(node, next) { |
{ | ||
"name": "vscode-pug-languageservice", | ||
"version": "0.29.4", | ||
"version": "0.29.5", | ||
"main": "out/index.js", | ||
@@ -20,6 +20,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/code-gen": "0.29.4", | ||
"@volar/shared": "0.29.4", | ||
"@volar/source-map": "0.29.4", | ||
"@volar/transforms": "0.29.4", | ||
"@volar/code-gen": "0.29.5", | ||
"@volar/shared": "0.29.5", | ||
"@volar/source-map": "0.29.5", | ||
"@volar/transforms": "0.29.5", | ||
"pug-lexer": "^5.0.1", | ||
@@ -29,3 +29,3 @@ "pug-parser": "^6.0.0", | ||
}, | ||
"gitHead": "efa0f05a86e921d50cec87cae701b5af45f38c1f" | ||
"gitHead": "17b50db7dbcee55457fa55127ad93a3806111abd" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32676
22
732
+ Added@volar/code-gen@0.29.5(transitive)
+ Added@volar/shared@0.29.5(transitive)
+ Added@volar/source-map@0.29.5(transitive)
+ Added@volar/transforms@0.29.5(transitive)
- Removed@volar/code-gen@0.29.4(transitive)
- Removed@volar/shared@0.29.4(transitive)
- Removed@volar/source-map@0.29.4(transitive)
- Removed@volar/transforms@0.29.4(transitive)
Updated@volar/code-gen@0.29.5
Updated@volar/shared@0.29.5
Updated@volar/source-map@0.29.5
Updated@volar/transforms@0.29.5