Skip to content

Commit

Permalink
feat: update to Volar 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 9, 2024
1 parent b800eca commit aee5739
Show file tree
Hide file tree
Showing 23 changed files with 86 additions and 90 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"@volar/language-service": "~2.3.0-alpha.5",
"typescript": "latest",
"vscode-languageserver-protocol": "^3.17.5"
"@volar/language-service": "~2.3.0",
"typescript": "latest"
}
}
2 changes: 1 addition & 1 deletion packages/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function create({
},
codeActionProvider: {},
definitionProvider: true,
diagnosticProvider: true,
diagnosticProvider: {},
hoverProvider: true,
referencesProvider: true,
documentHighlightProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
4 changes: 2 additions & 2 deletions packages/emmet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function create({
triggerCharacters: '>+^*()#.[]$@-{}'.split(''),
},
},
create(context, languageService): vscode.LanguageServicePluginInstance {
create(context): vscode.LanguageServicePluginInstance {

let lastCompletionType: string | undefined;

Expand Down Expand Up @@ -188,7 +188,7 @@ export function create({
} else {
const uri = URI.parse(document.uri);
const documentUri = context.decodeEmbeddedDocumentUri(uri)?.[0] ?? uri;
isNoisePromise = languageService.findDocumentSymbols(documentUri).then(symbols => {
isNoisePromise = context.getLanguageService().getDocumentSymbols(documentUri).then(symbols => {
return !!symbols && symbols.some(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/emmet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
4 changes: 2 additions & 2 deletions packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"url": "https://github.com/johnsoncodehk"
},
"dependencies": {
"vscode-html-languageservice": "npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462",
"vscode-html-languageservice": "^5.2.0",
"vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8"
},
"devDependencies": {
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/json/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function create({
resolveProvider: true,
},
definitionProvider: true,
diagnosticProvider: true,
diagnosticProvider: {},
hoverProvider: true,
documentLinkProvider: {},
documentSymbolProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function create({
triggerCharacters: ['.', '/', '#'],
},
definitionProvider: true,
diagnosticProvider: true,
diagnosticProvider: {},
documentHighlightProvider: true,
documentLinkProvider: {
resolveProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prettier": "^3.0.3"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5",
"@volar/language-service": "~2.3.0",
"prettier": "^2.2 || ^3.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettyhtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@starptech/prettyhtml": "^0.10.0"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pug-beautify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@johnsoncodehk/pug-beautify": "^0.2.2"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
6 changes: 3 additions & 3 deletions packages/pug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function create({
name: 'pug',
capabilities: {
completionProvider: {},
diagnosticProvider: true,
diagnosticProvider: {},
hoverProvider: true,
documentHighlightProvider: true,
documentLinkProvider: {},
Expand All @@ -46,9 +46,9 @@ export function create({
configurationSections: [configurationSections.autoCreateQuotes],
},
},
create(context, languageService): LanguageServicePluginInstance<Provide> {
create(context): LanguageServicePluginInstance<Provide> {

const htmlService = _htmlService.create(context, languageService);
const htmlService = _htmlService.create(context);
const pugDocuments = new WeakMap<TextDocument, [number, pug.PugDocument]>();
const pugLs = pug.getLanguageService(htmlService.provide['html/languageService']());

Expand Down
4 changes: 2 additions & 2 deletions packages/pug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"url": "https://github.com/johnsoncodehk"
},
"dependencies": {
"@volar/language-service": "~2.3.0-alpha.5",
"@volar/language-service": "~2.3.0",
"pug-lexer": "^5.0.1",
"pug-parser": "^6.0.0",
"volar-service-html": "0.0.50",
"vscode-html-languageservice": "npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462",
"vscode-html-languageservice": "^5.2.0",
"vscode-languageserver-textdocument": "^1.0.11"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sass-formatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sass-formatter": "^0.7.8"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-twoslash-queries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"volar-service-typescript": "0.0.50"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/lib/plugins/semantic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function create(
callHierarchyProvider: true,
definitionProvider: true,
typeDefinitionProvider: true,
diagnosticProvider: true,
diagnosticProvider: {},
hoverProvider: true,
implementationProvider: true,
referencesProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vetur/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"dependencies": {
"vls": "^0.8.5",
"vscode-html-languageservice": "npm:@johnsoncodehk/vscode-html-languageservice@5.2.0-34a5462",
"vscode-html-languageservice": "^5.2.0",
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/yaml/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function create({
triggerCharacters: [' ', ':'],
},
definitionProvider: true,
diagnosticProvider: true,
diagnosticProvider: {},
documentSymbolProvider: true,
hoverProvider: true,
documentLinkProvider: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/yaml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.3.0-alpha.5"
"@volar/language-service": "~2.3.0"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
Loading

0 comments on commit aee5739

Please sign in to comment.