volar-service-pug
Advanced tools
Comparing version 0.0.47 to 0.0.48
@@ -8,2 +8,3 @@ "use strict"; | ||
name: 'pug (stub)', | ||
capabilities: {}, | ||
create() { | ||
@@ -10,0 +11,0 @@ return {}; |
@@ -1,2 +0,2 @@ | ||
import type { Disposable, DocumentSelector, ProviderResult, ServiceContext, LanguageServicePlugin } from '@volar/language-service'; | ||
import type { Disposable, DocumentSelector, ProviderResult, LanguageServiceContext, LanguageServicePlugin } from '@volar/language-service'; | ||
import type * as html from 'vscode-html-languageservice'; | ||
@@ -11,5 +11,5 @@ import type { TextDocument } from 'vscode-languageserver-textdocument'; | ||
documentSelector?: DocumentSelector; | ||
getCustomData?(context: ServiceContext): ProviderResult<html.IHTMLDataProvider[]>; | ||
onDidChangeCustomData?(listener: () => void, context: ServiceContext): Disposable; | ||
getCustomData?(context: LanguageServiceContext): ProviderResult<html.IHTMLDataProvider[]>; | ||
onDidChangeCustomData?(listener: () => void, context: LanguageServiceContext): Disposable; | ||
}): LanguageServicePlugin; | ||
//# sourceMappingURL=index.d.ts.map |
20
index.js
@@ -15,4 +15,18 @@ "use strict"; | ||
name: 'pug', | ||
create(context) { | ||
const htmlService = _htmlService.create(context); | ||
capabilities: { | ||
completionProvider: {}, | ||
diagnosticProvider: true, | ||
hoverProvider: true, | ||
documentHighlightProvider: true, | ||
documentLinkProvider: {}, | ||
documentSymbolProvider: true, | ||
foldingRangeProvider: true, | ||
selectionRangeProvider: true, | ||
autoInsertionProvider: { | ||
triggerCharacters: ['='], | ||
configurationSections: ['html.autoCreateQuotes'], | ||
}, | ||
}, | ||
create(context, languageService) { | ||
const htmlService = _htmlService.create(context, languageService); | ||
const pugDocuments = new WeakMap(); | ||
@@ -81,3 +95,3 @@ const pugLs = pug.getLanguageService(htmlService.provide['html/languageService']()); | ||
}, | ||
async provideAutoInsertionEdit(document, selection, change) { | ||
async provideAutoInsertSnippet(document, selection, change) { | ||
// selection must at end of change | ||
@@ -84,0 +98,0 @@ if (document.offsetAt(selection) !== change.rangeOffset + change.text.length) { |
@@ -10,3 +10,3 @@ import type * as html from 'vscode-html-languageservice'; | ||
htmlDocument: html.HTMLDocument; | ||
map: import("@volar/language-service").SourceMapWithDocuments<any>; | ||
map: import("@volar/language-service").SourceMapWithDocuments; | ||
htmlCode: string; | ||
@@ -25,3 +25,3 @@ mappings: import("@volar/language-service").Mapping<any>[]; | ||
}; | ||
doComplete: (pugDoc: import("./pugDocument").PugDocument, pos: html.Position, serviceContext: import("@volar/language-service").ServiceContext, documentContext: html.DocumentContext | undefined, options?: html.CompletionConfiguration | undefined) => Promise<html.CompletionList | undefined>; | ||
doComplete: (pugDoc: import("./pugDocument").PugDocument, pos: html.Position, serviceContext: import("@volar/language-service").LanguageServiceContext, documentContext: html.DocumentContext | undefined, options?: html.CompletionConfiguration | undefined) => Promise<html.CompletionList | undefined>; | ||
findDocumentHighlights: (pugDoc: import("./pugDocument").PugDocument, pos: html.Position) => html.DocumentHighlight[] | undefined; | ||
@@ -28,0 +28,0 @@ findDocumentLinks: (pugDoc: import("./pugDocument").PugDocument, docContext: html.DocumentContext) => html.DocumentLink[]; |
@@ -8,3 +8,3 @@ import { SourceMapWithDocuments } from '@volar/language-service'; | ||
htmlDocument: html.HTMLDocument; | ||
map: SourceMapWithDocuments<any>; | ||
map: SourceMapWithDocuments; | ||
htmlCode: string; | ||
@@ -11,0 +11,0 @@ mappings: import("@volar/language-service").Mapping<any>[]; |
import type * as html from 'vscode-html-languageservice'; | ||
import type { PugDocument } from '../pugDocument'; | ||
import { ServiceContext } from '@volar/language-service'; | ||
export declare function register(htmlLs: html.LanguageService): (pugDoc: PugDocument, pos: html.Position, serviceContext: ServiceContext, documentContext: html.DocumentContext | undefined, options?: html.CompletionConfiguration | undefined) => Promise<html.CompletionList | undefined>; | ||
import { LanguageServiceContext } from '@volar/language-service'; | ||
export declare function register(htmlLs: html.LanguageService): (pugDoc: PugDocument, pos: html.Position, serviceContext: LanguageServiceContext, documentContext: html.DocumentContext | undefined, options?: html.CompletionConfiguration | undefined) => Promise<html.CompletionList | undefined>; | ||
//# sourceMappingURL=completion.d.ts.map |
{ | ||
"name": "volar-service-pug", | ||
"version": "0.0.47", | ||
"version": "0.0.48", | ||
"description": "Integrate Pug into Volar", | ||
@@ -27,6 +27,6 @@ "homepage": "https://github.com/volarjs/services/tree/master/packages/pug", | ||
"dependencies": { | ||
"@volar/language-service": "~2.2.3", | ||
"@volar/language-service": "~2.3.0-alpha.0", | ||
"pug-lexer": "^5.0.1", | ||
"pug-parser": "^6.0.0", | ||
"volar-service-html": "0.0.47", | ||
"volar-service-html": "0.0.48", | ||
"vscode-html-languageservice": "npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462", | ||
@@ -41,3 +41,3 @@ "vscode-languageserver-textdocument": "^1.0.11" | ||
}, | ||
"gitHead": "d53f4dfa7007e77409af3ef28cc165e9940e7313" | ||
"gitHead": "6a80c92133e154907a79eefa05603f63994214c3" | ||
} |
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
39127
844
+ Added@volar/language-core@2.3.4(transitive)
+ Added@volar/language-service@2.3.4(transitive)
+ Added@volar/source-map@2.3.4(transitive)
+ Addedvolar-service-html@0.0.48(transitive)
- Removed@volar/language-core@2.2.5(transitive)
- Removed@volar/language-service@2.2.5(transitive)
- Removed@volar/source-map@2.2.5(transitive)
- Removedmuggle-string@0.4.1(transitive)
- Removedvolar-service-html@0.0.47(transitive)
Updatedvolar-service-html@0.0.48