diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index bbd1c3b0f1..2799749f3a 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -283,67 +283,6 @@ "type": "object", "title": "Volar", "properties": { - "volar.format.initialIndent": { - "type": "object", - "description": "Whether to have initial indent.", - "default": { - "html": true - }, - "properties": { - "html": { - "type": "boolean", - "default": true - }, - "typescript": { - "type": "boolean", - "default": false - }, - "javascript": { - "type": "boolean", - "default": false - }, - "typescriptreact": { - "type": "boolean", - "default": false - }, - "javascriptreact": { - "type": "boolean", - "default": false - }, - "css": { - "type": "boolean", - "default": false - }, - "scss": { - "type": "boolean", - "default": false - }, - "less": { - "type": "boolean", - "default": false - }, - "sass": { - "type": "boolean", - "default": false - }, - "jade": { - "type": "boolean", - "default": false - }, - "json": { - "type": "boolean", - "default": false - }, - "jsonc": { - "type": "boolean", - "default": false - }, - "json5": { - "type": "boolean", - "default": false - } - } - }, "vue.trace.server": { "scope": "window", "type": "string", @@ -406,11 +345,6 @@ "default": null, "description": "Set --max-old-space-size option on server process. If you have problem on frequently \"Request textDocument/** failed.\" error, try setting higher memory(MB) on it." }, - "vue.server.reverseConfigFilePriority": { - "type": "boolean", - "default": false, - "description": "Reverse priority for tsconfig pickup." - }, "vue.server.additionalExtensions": { "type": "array", "items": { @@ -419,11 +353,6 @@ "default": [ ], "description": "List any additional file extensions that should be processed as Vue files (requires restart)." }, - "vue.server.fullCompletionList": { - "type": "boolean", - "default": false, - "description": "Enable this option if you want to get complete CompletionList in language client. (Disable for better performance)" - }, "vue.doctor.status": { "type": "boolean", "default": true, @@ -537,6 +466,18 @@ "type": "boolean", "default": false, "description": "Show inlay hints for component options wrapper for type support." + }, + "vue.format.template.initialIndent": { + "type": "boolean", + "default": true + }, + "vue.format.style.initialIndent": { + "type": "boolean", + "default": false + }, + "vue.format.script.initialIndent": { + "type": "boolean", + "default": false } } }, @@ -643,7 +584,7 @@ "devDependencies": { "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", - "@volar/vscode": "~2.0.2", + "@volar/vscode": "~2.1.0", "@vue/language-core": "1.8.27", "@vue/language-server": "1.8.27", "esbuild": "latest", diff --git a/extensions/vscode/src/common.ts b/extensions/vscode/src/common.ts index 91e2412828..1f6b2e0c2c 100644 --- a/extensions/vscode/src/common.ts +++ b/extensions/vscode/src/common.ts @@ -143,25 +143,23 @@ export function getDocumentSelector(): lsp.DocumentFilter[] { async function getInitializationOptions( context: vscode.ExtensionContext, - options: VueInitializationOptions = {}, -) { - // volar - options.diagnosticModel = config.server.diagnosticModel === 'pull' ? DiagnosticModel.Pull : DiagnosticModel.Push; - options.typescript = { tsdk: (await getTsdk(context)).tsdk }; - options.reverseConfigFilePriority = config.server.reverseConfigFilePriority; - options.maxFileSize = config.server.maxFileSize; - options.semanticTokensLegend = { - tokenTypes: ['component'], - tokenModifiers: [], +): Promise { + return { + // volar + diagnosticModel: config.server.diagnosticModel === 'pull' ? DiagnosticModel.Pull : DiagnosticModel.Push, + typescript: { tsdk: (await getTsdk(context)).tsdk }, + maxFileSize: config.server.maxFileSize, + semanticTokensLegend: { + tokenTypes: ['component'], + tokenModifiers: [], + }, + vue: { + hybridMode: true, + additionalExtensions: [ + ...config.server.additionalExtensions, + ...!config.server.petiteVue.supportHtmlFile ? [] : ['html'], + ...!config.server.vitePress.supportMdFile ? [] : ['md'], + ], + }, }; - options.fullCompletionList = config.server.fullCompletionList; - options.vue = { - hybridMode: true, - additionalExtensions: [ - ...config.server.additionalExtensions, - ...!config.server.petiteVue.supportHtmlFile ? [] : ['html'], - ...!config.server.vitePress.supportMdFile ? [] : ['md'], - ], - }; - return options; } diff --git a/extensions/vscode/src/config.ts b/extensions/vscode/src/config.ts index b169d6ca7a..84b8feea07 100644 --- a/extensions/vscode/src/config.ts +++ b/extensions/vscode/src/config.ts @@ -20,10 +20,8 @@ export const config = { runtime: 'node' | 'bun'; maxOldSpaceSize: number; maxFileSize: number; - reverseConfigFilePriority: boolean; diagnosticModel: 'push' | 'pull'; additionalExtensions: string[]; - fullCompletionList: boolean; vitePress: { supportMdFile: boolean; }; diff --git a/package.json b/package.json index bd2971e8a5..2eee977c30 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@lerna-lite/cli": "latest", "@lerna-lite/publish": "latest", - "@volar/language-service": "~2.0.2", + "@volar/language-service": "~2.1.0", "typescript": "latest", "vite": "latest", "vitest": "latest" diff --git a/packages/component-meta/package.json b/packages/component-meta/package.json index abb6e648fe..15b64d6509 100644 --- a/packages/component-meta/package.json +++ b/packages/component-meta/package.json @@ -13,7 +13,7 @@ "directory": "packages/component-meta" }, "dependencies": { - "@volar/typescript": "~2.0.2", + "@volar/typescript": "~2.1.0", "@vue/language-core": "1.8.27", "path-browserify": "^1.0.1", "vue-component-type-helpers": "1.8.27" diff --git a/packages/language-core/package.json b/packages/language-core/package.json index e52cce57de..b3965bbd44 100644 --- a/packages/language-core/package.json +++ b/packages/language-core/package.json @@ -13,7 +13,7 @@ "directory": "packages/language-core" }, "dependencies": { - "@volar/language-core": "~2.0.2", + "@volar/language-core": "~2.1.0", "@vue/compiler-dom": "^3.4.0", "@vue/shared": "^3.4.0", "computeds": "^0.0.1", diff --git a/packages/language-core/src/generators/template.ts b/packages/language-core/src/generators/template.ts index 2f14b9fc7f..e69c7d1316 100644 --- a/packages/language-core/src/generators/template.ts +++ b/packages/language-core/src/generators/template.ts @@ -480,8 +480,8 @@ export function* generate( content, start, lines.length <= 1 ? formatBrackets.curly : [ - formatBrackets.curly[0], - lines[lines.length - 1].trim() === '' ? '' : formatBrackets.curly[1], + lines[0].trim() === '' ? '(' : formatBrackets.curly[0], + lines[lines.length - 1].trim() === '' ? ')' : formatBrackets.curly[1], ], ); } diff --git a/packages/language-core/src/virtualFile/computedFiles.ts b/packages/language-core/src/virtualFile/computedFiles.ts index cacc5b4315..9cfa5e73f3 100644 --- a/packages/language-core/src/virtualFile/computedFiles.ts +++ b/packages/language-core/src/virtualFile/computedFiles.ts @@ -79,6 +79,7 @@ export function computedFiles( else { const parent = findParentStructure(file.parentFileId, embeddedCodes); if (parent) { + parent.embeddedCodes ??= []; parent.embeddedCodes.push({ id: file.id, languageId: resolveCommonLanguageId(`/dummy.${file.lang}`), @@ -98,7 +99,7 @@ export function computedFiles( if (child.id === id) { return child; } - let parent = findParentStructure(id, child.embeddedCodes); + let parent = findParentStructure(id, child.embeddedCodes ?? []); if (parent) { return parent; } diff --git a/packages/language-plugin-pug/package.json b/packages/language-plugin-pug/package.json index 2d44bcf518..4521324c08 100644 --- a/packages/language-plugin-pug/package.json +++ b/packages/language-plugin-pug/package.json @@ -17,7 +17,7 @@ "@vue/language-core": "1.8.27" }, "dependencies": { - "@volar/source-map": "~2.0.2", - "volar-service-pug": "0.0.28" + "@volar/source-map": "~2.1.0", + "volar-service-pug": "0.0.31" } } diff --git a/packages/language-server/package.json b/packages/language-server/package.json index ec8ea014cc..f59db70a08 100644 --- a/packages/language-server/package.json +++ b/packages/language-server/package.json @@ -16,8 +16,8 @@ "directory": "packages/language-server" }, "dependencies": { - "@volar/language-core": "~2.0.2", - "@volar/language-server": "~2.0.2", + "@volar/language-core": "~2.1.0", + "@volar/language-server": "~2.1.0", "@vue/language-core": "1.8.27", "@vue/language-service": "1.8.27", "vscode-languageserver-protocol": "^3.17.5", diff --git a/packages/language-server/src/nodeServer.ts b/packages/language-server/src/nodeServer.ts index aaf0273d1e..29de9d6fef 100644 --- a/packages/language-server/src/nodeServer.ts +++ b/packages/language-server/src/nodeServer.ts @@ -1,4 +1,4 @@ -import { createConnection, createServer, createSimpleProjectProvider, createTypeScriptProjectProvider } from '@volar/language-server/node'; +import { createConnection, createServer, createSimpleProjectProviderFactory, createTypeScriptProjectProviderFactory, loadTsdkByPath } from '@volar/language-server/node'; import { ServerProject } from '@volar/language-server'; import * as vue2 from '@vue/language-core'; import { VueCompilerOptions } from '@vue/language-core'; @@ -13,11 +13,16 @@ const server = createServer(connection); const checkers = new WeakMap(); const envToVueOptions = new WeakMap(); +let tsdk: ReturnType; + connection.listen(); connection.onInitialize(params => { const options: VueInitializationOptions = params.initializationOptions; + + tsdk = loadTsdkByPath(options.typescript.tsdk!, params.locale); + const vueFileExtensions: string[] = ['vue']; if (options.vue?.additionalExtensions) { @@ -28,20 +33,20 @@ connection.onInitialize(params => { return server.initialize( params, - options.vue?.hybridMode ? createSimpleProjectProvider : createTypeScriptProjectProvider, + options.vue?.hybridMode + ? createSimpleProjectProviderFactory() + : createTypeScriptProjectProviderFactory(tsdk.typescript, tsdk.diagnosticMessages), { watchFileExtensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'json', ...vueFileExtensions], getServicePlugins() { - const ts = getTsLib(); - const services = vue.resolveServices({}, ts, env => envToVueOptions.get(env)!); + const services = vue.resolveServices({}, tsdk.typescript, env => envToVueOptions.get(env)!); return Object.values(services); }, async getLanguagePlugins(serviceEnv, projectContext) { - const ts = getTsLib(); const [commandLine, vueOptions] = await parseCommandLine(); const resolvedVueOptions = vue.resolveVueCompilerOptions(vueOptions); - const languages = vue.resolveLanguages({}, ts, serviceEnv.typescript!.uriToFileName, commandLine?.options ?? {}, resolvedVueOptions, options.codegenStack); + const languages = vue.resolveLanguages({}, tsdk.typescript, serviceEnv.typescript!.uriToFileName, commandLine?.options ?? {}, resolvedVueOptions, options.codegenStack); envToVueOptions.set(serviceEnv, resolvedVueOptions); @@ -62,7 +67,7 @@ connection.onInitialize(params => { while (sysVersion !== newSysVersion) { sysVersion = newSysVersion; if (projectContext.typescript.configFileName) { - commandLine = vue2.createParsedCommandLine(ts, sys, projectContext.typescript.configFileName); + commandLine = vue2.createParsedCommandLine(tsdk.typescript, sys, projectContext.typescript.configFileName); } newSysVersion = await sys.sync(); } @@ -99,14 +104,14 @@ connection.onRequest(ParseSFCRequest.type, params => { connection.onRequest(DetectNameCasingRequest.type, async params => { const languageService = await getService(params.textDocument.uri); if (languageService) { - return nameCasing.detect(getTsLib(), languageService.context, params.textDocument.uri, envToVueOptions.get(languageService.context.env)!); + return nameCasing.detect(tsdk.typescript, languageService.context, params.textDocument.uri, envToVueOptions.get(languageService.context.env)!); } }); connection.onRequest(GetConvertTagCasingEditsRequest.type, async params => { const languageService = await getService(params.textDocument.uri); if (languageService) { - return nameCasing.convertTagName(getTsLib(), languageService.context, params.textDocument.uri, params.casing, envToVueOptions.get(languageService.context.env)!); + return nameCasing.convertTagName(tsdk.typescript, languageService.context, params.textDocument.uri, params.casing, envToVueOptions.get(languageService.context.env)!); } }); @@ -115,7 +120,7 @@ connection.onRequest(GetConvertAttrCasingEditsRequest.type, async params => { if (languageService) { const vueOptions = envToVueOptions.get(languageService.context.env); if (vueOptions) { - return nameCasing.convertAttrName(getTsLib(), languageService.context, params.textDocument.uri, params.casing, envToVueOptions.get(languageService.context.env)!); + return nameCasing.convertAttrName(tsdk.typescript, languageService.context, params.textDocument.uri, params.casing, envToVueOptions.get(languageService.context.env)!); } } }); @@ -128,7 +133,7 @@ connection.onRequest(GetComponentMeta.type, async params => { let checker = checkers.get(project); if (!checker) { checker = componentMeta.baseCreate( - getTsLib(), + tsdk.typescript, langaugeService.context.language.typescript!.configFileName, langaugeService.context.language.typescript!.projectHost, envToVueOptions.get(langaugeService.context.env)!, @@ -140,14 +145,6 @@ connection.onRequest(GetComponentMeta.type, async params => { return checker?.getComponentMeta(langaugeService.context.env.typescript!.uriToFileName(params.uri)); }); -function getTsLib() { - const ts = server.modules.typescript; - if (!ts) { - throw 'typescript not found'; - } - return ts; -} - async function getService(uri: string) { return (await server.projects.getProject(uri)).getLanguageService(); } diff --git a/packages/language-server/src/types.ts b/packages/language-server/src/types.ts index 2d1efe03b8..4736cd7b7f 100644 --- a/packages/language-server/src/types.ts +++ b/packages/language-server/src/types.ts @@ -1,6 +1,10 @@ import { InitializationOptions } from "@volar/language-server"; export type VueInitializationOptions = InitializationOptions & { + typescript: { + tsdk?: string; + tsdkUrl?: string; + } vue?: { /** * @example ['vue1', 'vue2'] diff --git a/packages/language-service/package.json b/packages/language-service/package.json index 5b8890c4df..e99be708f1 100644 --- a/packages/language-service/package.json +++ b/packages/language-service/package.json @@ -17,29 +17,29 @@ "update-html-data": "node ./scripts/update-html-data.js" }, "dependencies": { - "@volar/language-core": "~2.0.2", - "@volar/language-service": "~2.0.2", - "@volar/typescript": "~2.0.2", + "@volar/language-core": "~2.1.0", + "@volar/language-service": "~2.1.0", + "@volar/typescript": "~2.1.0", "@vue/compiler-dom": "^3.4.0", "@vue/language-core": "1.8.27", "@vue/shared": "^3.4.0", "computeds": "^0.0.1", "path-browserify": "^1.0.1", - "volar-service-css": "0.0.28", - "volar-service-emmet": "0.0.28", - "volar-service-html": "0.0.28", - "volar-service-json": "0.0.28", - "volar-service-pug": "0.0.28", - "volar-service-pug-beautify": "0.0.28", - "volar-service-typescript": "0.0.28", - "volar-service-typescript-twoslash-queries": "0.0.28", + "volar-service-css": "0.0.31", + "volar-service-emmet": "0.0.31", + "volar-service-html": "0.0.31", + "volar-service-json": "0.0.31", + "volar-service-pug": "0.0.31", + "volar-service-pug-beautify": "0.0.31", + "volar-service-typescript": "0.0.31", + "volar-service-typescript-twoslash-queries": "0.0.31", "vscode-html-languageservice": "^5.1.0", "vscode-languageserver-textdocument": "^1.0.11" }, "devDependencies": { "@types/node": "latest", "@types/path-browserify": "latest", - "@volar/kit": "~2.0.2", + "@volar/kit": "~2.1.0", "vscode-languageserver-protocol": "^3.17.5", "vscode-uri": "^3.0.8" } diff --git a/packages/language-service/src/languageService.ts b/packages/language-service/src/languageService.ts index 5f7d180f71..c174e9f80c 100644 --- a/packages/language-service/src/languageService.ts +++ b/packages/language-service/src/languageService.ts @@ -1,4 +1,4 @@ -import { ServiceEnvironment, ServicePlugin } from '@volar/language-service'; +import { ServiceEnvironment, ServicePlugin, ServicePluginInstance } from '@volar/language-service'; import { LanguagePlugin, VueGeneratedCode, createLanguages, hyphenateTag, scriptRanges } from '@vue/language-core'; import { capitalize } from '@vue/shared'; import type * as ts from 'typescript/lib/tsserverlibrary'; @@ -90,7 +90,7 @@ export function resolveServices( for (const map of context.documents.getMaps(virtualCode)) { - const sourceVirtualFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceVirtualFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; if (sourceVirtualFile instanceof VueGeneratedCode) { @@ -235,39 +235,92 @@ export function resolveServices( }; }, }; + + let customData: html.IHTMLDataProvider[] = []; + const onDidChangeCustomDataListeners = new Set<() => void>(); + services.html ??= createVueTemplateLanguageService( ts, - createHtmlService(), + createHtmlService({ + getCustomData() { + return customData; + }, + onDidChangeCustomData(listener) { + onDidChangeCustomDataListeners.add(listener); + return { + dispose() { + onDidChangeCustomDataListeners.delete(listener); + }, + }; + }, + }), getVueOptions, { getScanner: (htmlService, document): html.Scanner | undefined => { return htmlService.provide['html/languageService']().createScanner(document.getText()); }, - updateCustomData(htmlService, extraData) { - htmlService.provide['html/updateCustomData'](extraData); + updateCustomData(extraData) { + customData = extraData; + onDidChangeCustomDataListeners.forEach(l => l()); }, isSupportedDocument: (document) => document.languageId === 'html', } ); services.pug ??= createVueTemplateLanguageService( ts, - createPugService(), + createPugService({ + getCustomData() { + return customData; + }, + onDidChangeCustomData(listener) { + onDidChangeCustomDataListeners.add(listener); + return { + dispose() { + onDidChangeCustomDataListeners.delete(listener); + }, + }; + }, + }), getVueOptions, { - getScanner: (pugService, document): html.Scanner | undefined => { + getScanner(pugService, document): html.Scanner | undefined { const pugDocument = pugService.provide['pug/pugDocument'](document); if (pugDocument) { return pugService.provide['pug/languageService']().createScanner(pugDocument); } }, - updateCustomData(pugService, extraData) { - pugService.provide['pug/updateCustomData'](extraData); + updateCustomData(extraData) { + customData = extraData; + onDidChangeCustomDataListeners.forEach(l => l()); + }, + isSupportedDocument(document) { + return document.languageId === 'jade'; }, - isSupportedDocument: (document) => document.languageId === 'jade', } ); services.vue ??= createVueService(); - services.css ??= createCssService(); + + const baseCssService = createCssService({ scssDocumentSelector: ['scss', 'postcss'] }); + const cssService: ServicePlugin = { + ...baseCssService, + create(context): ServicePluginInstance { + const serviceInstance = baseCssService.create(context); + return { + ...serviceInstance, + async provideDiagnostics(document, token) { + let diagnostics = await serviceInstance.provideDiagnostics?.(document, token) ?? []; + if (document.languageId === 'postcss') { + diagnostics = diagnostics.filter(diag => diag.code !== 'css-semicolonexpected'); + diagnostics = diagnostics.filter(diag => diag.code !== 'css-ruleorselectorexpected'); + diagnostics = diagnostics.filter(diag => diag.code !== 'unknownAtRules'); + } + return diagnostics; + }, + }; + }, + }; + + services.css ??= cssService; services['pug-beautify'] ??= createPugFormatService(); services.json ??= createJsonService(); services['typescript/twoslash-queries'] ??= createTsTqService(); diff --git a/packages/language-service/src/plugins/vue-extract-file.ts b/packages/language-service/src/plugins/vue-extract-file.ts index 7a8983649e..5f3db5e51d 100644 --- a/packages/language-service/src/plugins/vue-extract-file.ts +++ b/packages/language-service/src/plugins/vue-extract-file.ts @@ -70,23 +70,22 @@ export function create(ts: typeof import('typescript/lib/tsserverlibrary')): Ser return codeAction; const languageService = context.inject('typescript/languageService'); - const languageServiceHost = context.inject('typescript/languageServiceHost'); const sourceFile = languageService.getProgram()!.getSourceFile(vueCode.fileName)!; - const sourceFileKind = languageServiceHost.getScriptKind?.(vueCode.fileName); const toExtract = collectExtractProps(); - const initialIndentSetting = (await context.env.getConfiguration!('volar.format.initialIndent') ?? { html: true }) as Record; + const templateInitialIndent = await context.env.getConfiguration!('vue.format.template.initialIndent') ?? true; + const scriptInitialIndent = await context.env.getConfiguration!('vue.format.script.initialIndent') ?? false; const newUri = document.uri.substring(0, document.uri.lastIndexOf('/') + 1) + `${newName}.vue`; const lastImportNode = getLastImportNode(ts, script.ast); let newFileTags = []; newFileTags.push( - constructTag('template', [], initialIndentSetting.html, sfc.template.content.substring(templateCodeRange[0], templateCodeRange[1])) + constructTag('template', [], templateInitialIndent, sfc.template.content.substring(templateCodeRange[0], templateCodeRange[1])) ); if (toExtract.length) { newFileTags.push( - constructTag('script', ['setup', 'lang="ts"'], isInitialIndentNeeded(ts, sourceFileKind!, initialIndentSetting), generateNewScriptContents()) + constructTag('script', ['setup', 'lang="ts"'], scriptInitialIndent, generateNewScriptContents()) ); } if (sfc.template.startTagEnd > script.startTagEnd) { @@ -290,16 +289,6 @@ function constructTag(name: string, attributes: string[], initialIndent: boolean return `<${name}${attributesString}>\n${content}\n\n`; } -function isInitialIndentNeeded(ts: typeof import("typescript/lib/tsserverlibrary"), languageKind: ts.ScriptKind, initialIndentSetting: Record) { - const languageKindIdMap = { - [ts.ScriptKind.JS]: 'javascript', - [ts.ScriptKind.TS]: 'typescript', - [ts.ScriptKind.JSX]: 'javascriptreact', - [ts.ScriptKind.TSX]: 'typescriptreact', - } as Record; - return initialIndentSetting[languageKindIdMap[languageKind]] ?? false; -} - export function getLastImportNode(ts: typeof import('typescript/lib/tsserverlibrary'), sourceFile: ts.SourceFile) { let lastImportNode: ts.Node | undefined; diff --git a/packages/language-service/src/plugins/vue-template.ts b/packages/language-service/src/plugins/vue-template.ts index e19c55b505..1f89b67b74 100644 --- a/packages/language-service/src/plugins/vue-template.ts +++ b/packages/language-service/src/plugins/vue-template.ts @@ -19,7 +19,7 @@ export function create( getVueOptions: (env: ServiceEnvironment) => VueCompilerOptions, options: { getScanner(service: ServicePluginInstance, document: TextDocument): html.Scanner | undefined, - updateCustomData(service: ServicePluginInstance, extraData: html.IHTMLDataProvider[]): void, + updateCustomData(extraData: html.IHTMLDataProvider[]): void, isSupportedDocument: (document: TextDocument) => boolean, } ): ServicePlugin { @@ -80,7 +80,7 @@ export function create( if (virtualCode) { for (const map of context.documents.getMaps(virtualCode)) { - const sourceVirtualFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceVirtualFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; if (sourceVirtualFile instanceof VueGeneratedCode) { await provideHtmlData(map, sourceVirtualFile); } @@ -93,7 +93,7 @@ export function create( if (virtualCode) { for (const map of context.documents.getMaps(virtualCode)) { - const sourceVirtualFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceVirtualFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; if (sourceVirtualFile instanceof VueGeneratedCode) { afterHtmlCompletion(htmlComplete, map, sourceVirtualFile); } @@ -120,13 +120,13 @@ export function create( for (const map of context.documents.getMaps(virtualCode)) { - const sourceVirtualFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceVirtualFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; const scanner = options.getScanner(baseServiceInstance, document); if (sourceVirtualFile instanceof VueGeneratedCode && scanner) { // visualize missing required props - const casing = await getNameCasing(ts, context, map.sourceFileDocument.uri, vueCompilerOptions); + const casing = await getNameCasing(ts, context, map.sourceDocument.uri, vueCompilerOptions); const components = getComponentNames(ts, languageService, sourceVirtualFile, vueCompilerOptions); const componentProps: Record = {}; let token: html.TokenType; @@ -226,7 +226,7 @@ export function create( return; if (context.documents.getVirtualCodeByUri(document.uri)[0]) - options.updateCustomData(baseServiceInstance, []); + options.updateCustomData([]); return baseServiceInstance.provideHover?.(document, position, token); }, @@ -244,7 +244,7 @@ export function create( for (const map of context.documents.getMaps(virtualCode)) { - const sourceVirtualFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceVirtualFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; if (!(sourceVirtualFile instanceof VueGeneratedCode)) continue; @@ -306,7 +306,7 @@ export function create( for (const map of context.documents.getMaps(virtualCode)) { - const sourceFile = context.language.files.get(map.sourceFileDocument.uri)?.generated?.code; + const sourceFile = context.language.files.get(map.sourceDocument.uri)?.generated?.code; if (!(sourceFile instanceof VueGeneratedCode)) continue; @@ -359,7 +359,7 @@ export function create( async function provideHtmlData(map: SourceMapWithDocuments, vueCode: VueGeneratedCode) { const languageService = context.inject('typescript/languageService'); - const casing = await getNameCasing(ts, context, map.sourceFileDocument.uri, vueCompilerOptions); + const casing = await getNameCasing(ts, context, map.sourceDocument.uri, vueCompilerOptions); if (builtInData.tags) { for (const tag of builtInData.tags) { @@ -378,7 +378,7 @@ export function create( } } - options.updateCustomData(baseServiceInstance, [ + options.updateCustomData([ html.newHTMLDataProvider('vue-template-built-in', builtInData), { getId: () => 'vue-template', @@ -552,7 +552,7 @@ export function create( function afterHtmlCompletion(completionList: vscode.CompletionList, map: SourceMapWithDocuments, vueSourceFile: VueGeneratedCode) { const languageService = context.inject('typescript/languageService'); - const replacement = getReplacement(completionList, map.sourceFileDocument); + const replacement = getReplacement(completionList, map.sourceDocument); const componentNames = new Set( getComponentNames( ts, @@ -677,7 +677,7 @@ export function create( } } - options.updateCustomData(baseServiceInstance, []); + options.updateCustomData([]); } }, }; diff --git a/packages/language-service/src/plugins/vue.ts b/packages/language-service/src/plugins/vue.ts index fc53cf48ae..3edd8e53d8 100644 --- a/packages/language-service/src/plugins/vue.ts +++ b/packages/language-service/src/plugins/vue.ts @@ -18,11 +18,15 @@ export function create(): ServicePlugin { name: 'vue-basic', create(context): ServicePluginInstance { - const htmlPlugin = createHtmlService({ languageId: 'vue', useCustomDataProviders: false }).create(context); + const htmlPlugin = createHtmlService({ + documentSelector: ['vue'], + useCustomDataProviders: false, + }).create(context); + const htmlLanguageService: html.LanguageService = htmlPlugin.provide['html/languageService'](); sfcDataProvider ??= html.newHTMLDataProvider('vue', loadLanguageBlocks(context.env.locale ?? 'en')); - htmlPlugin.provide['html/languageService']().setDataProviders(false, [sfcDataProvider]); + htmlLanguageService.setDataProviders(false, [sfcDataProvider]); return { @@ -36,6 +40,31 @@ export function create(): ServicePlugin { }, }, + async resolveEmbeddedCodeFormattingOptions(code, options) { + + const sourceFile = context.language.files.getByVirtualCode(code); + + if (sourceFile.generated?.code instanceof vue.VueGeneratedCode) { + if (code.id === 'scriptFormat' || code.id === 'scriptSetupFormat') { + if (await context.env.getConfiguration?.('vue.format.script.initialIndent') ?? false) { + options.initialIndentLevel++; + } + } + else if (code.id.startsWith('style_')) { + if (await context.env.getConfiguration?.('vue.format.style.initialIndent') ?? false) { + options.initialIndentLevel++; + } + } + else if (code.id === 'template') { + if (await context.env.getConfiguration?.('vue.format.template.initialIndent') ?? true) { + options.initialIndentLevel++; + } + } + } + + return options; + }, + provideSemanticDiagnostics(document) { return worker(document, (vueCode) => { @@ -154,37 +183,26 @@ export function create(): ServicePlugin { }); }, - provideDocumentFormattingEdits(document) { - return worker(document, (vueSourceFile) => { + provideDocumentFormattingEdits(document, range, options) { + return worker(document, async vueCode => { - const blocks = [ - vueSourceFile.sfc.script, - vueSourceFile.sfc.scriptSetup, - vueSourceFile.sfc.template, - ...vueSourceFile.sfc.styles, - ...vueSourceFile.sfc.customBlocks, - ].filter((block): block is NonNullable => !!block) - .sort((a, b) => b.start - a.start); - - const edits: vscode.TextEdit[] = []; - - for (const block of blocks) { - const startPos = document.positionAt(block.start); - if (startPos.character !== 0) { - edits.push({ - range: { - start: { - line: startPos.line, - character: 0, - }, - end: startPos, - }, - newText: '', - }); - } + const formatSettings = await context.env.getConfiguration?.('html.format') ?? {}; + const blockTypes = ['template', 'script', 'style']; + + for (const customBlock of vueCode.sfc.customBlocks) { + blockTypes.push(customBlock.type); } - return edits; + return htmlLanguageService.format(document, range, { + ...options, + ...formatSettings, + unformatted: '', + contentUnformatted: blockTypes.join(','), + extraLiners: blockTypes.join(','), + endWithNewline: options.insertFinalNewline ? true + : options.trimFinalNewlines ? false + : document.getText().endsWith('\n'), + }); }); }, }; diff --git a/packages/language-service/tests/format/1806.spec.ts b/packages/language-service/tests/format/1806.spec.ts index 75ddd6039e..8a78968711 100644 --- a/packages/language-service/tests/format/1806.spec.ts +++ b/packages/language-service/tests/format/1806.spec.ts @@ -40,10 +40,8 @@ export { } `.trim(), settings: { - 'volar.format.initialIndent': { - html: false, - javascript: true, - css: true - } + 'vue.format.template.initialIndent': false, + 'vue.format.script.initialIndent': true, + 'vue.format.style.initialIndent': true, }, }); diff --git a/packages/language-service/tests/format/2520.spec.ts b/packages/language-service/tests/format/2520.spec.ts index 78cb3e3fb3..b320a1d94b 100644 --- a/packages/language-service/tests/format/2520.spec.ts +++ b/packages/language-service/tests/format/2520.spec.ts @@ -21,4 +21,7 @@ defineFormatTest({ `.trim(), + settings: { + 'html.format.contentUnformatted': 'pre', + }, }); diff --git a/packages/language-service/tests/format/js template strings.spec.ts b/packages/language-service/tests/format/js template strings.spec.ts index 67dc892e7d..df8e97f991 100644 --- a/packages/language-service/tests/format/js template strings.spec.ts +++ b/packages/language-service/tests/format/js template strings.spec.ts @@ -32,8 +32,6 @@ txt `.trim(), settings: { - 'volar.format.initialIndent': { - javascript: true - } + 'vue.format.script.initialIndent': true, }, }); diff --git a/packages/language-service/tests/utils/format.ts b/packages/language-service/tests/utils/format.ts index 1f21136819..72dffd5fd9 100644 --- a/packages/language-service/tests/utils/format.ts +++ b/packages/language-service/tests/utils/format.ts @@ -27,7 +27,7 @@ export function defineFormatTest(options: { { insertSpaces: false, tabSize: 4 }, ); - expect(formatted).toBe((options.output ?? options.input)); + expect(formatted.replace(/\r\n/g, '\n')).toBe((options.output ?? options.input).replace(/\r\n/g, '\n')); }); }); } diff --git a/packages/tsc/package.json b/packages/tsc/package.json index 2555f96727..414c0f1970 100644 --- a/packages/tsc/package.json +++ b/packages/tsc/package.json @@ -17,7 +17,7 @@ "vue-tsc": "./bin/vue-tsc.js" }, "dependencies": { - "@volar/typescript": "~2.0.2", + "@volar/typescript": "~2.1.0", "@vue/language-core": "1.8.27", "semver": "^7.5.4" }, diff --git a/packages/typescript-plugin/package.json b/packages/typescript-plugin/package.json index 7b0c24c049..e2ca8f22dc 100644 --- a/packages/typescript-plugin/package.json +++ b/packages/typescript-plugin/package.json @@ -13,7 +13,7 @@ "directory": "packages/typescript-plugin" }, "dependencies": { - "@volar/typescript": "~2.0.2", + "@volar/typescript": "~2.1.0", "@vue/language-core": "1.8.27" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3e70afa47..10a807e297 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: latest version: 3.2.1(typescript@5.3.3) '@volar/language-service': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 typescript: specifier: latest version: 5.3.3 @@ -36,8 +36,8 @@ importers: specifier: ^1.82.0 version: 1.85.0 '@volar/vscode': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/language-core': specifier: 1.8.27 version: link:../../packages/language-core @@ -69,8 +69,8 @@ importers: packages/component-meta: dependencies: '@volar/typescript': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/language-core': specifier: 1.8.27 version: link:../language-core @@ -96,8 +96,8 @@ importers: packages/language-core: dependencies: '@volar/language-core': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.14 @@ -136,11 +136,11 @@ importers: packages/language-plugin-pug: dependencies: '@volar/source-map': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 volar-service-pug: - specifier: 0.0.28 - version: 0.0.28 + specifier: 0.0.31 + version: 0.0.31 devDependencies: '@types/node': specifier: latest @@ -152,11 +152,11 @@ importers: packages/language-server: dependencies: '@volar/language-core': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@volar/language-server': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/language-core': specifier: 1.8.27 version: link:../language-core @@ -173,14 +173,14 @@ importers: packages/language-service: dependencies: '@volar/language-core': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@volar/language-service': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@volar/typescript': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.14 @@ -197,29 +197,29 @@ importers: specifier: ^1.0.1 version: 1.0.1 volar-service-css: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) volar-service-emmet: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) volar-service-html: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) volar-service-json: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) volar-service-pug: - specifier: 0.0.28 - version: 0.0.28 + specifier: 0.0.31 + version: 0.0.31 volar-service-pug-beautify: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) volar-service-typescript: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2)(@volar/typescript@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0)(@volar/typescript@2.1.0) volar-service-typescript-twoslash-queries: - specifier: 0.0.28 - version: 0.0.28(@volar/language-service@2.0.2) + specifier: 0.0.31 + version: 0.0.31(@volar/language-service@2.1.0) vscode-html-languageservice: specifier: ^5.1.0 version: 5.1.1 @@ -234,8 +234,8 @@ importers: specifier: latest version: 1.0.2 '@volar/kit': - specifier: ~2.0.2 - version: 2.0.2(typescript@5.3.3) + specifier: ~2.1.0 + version: 2.1.0(typescript@5.3.3) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -246,8 +246,8 @@ importers: packages/tsc: dependencies: '@volar/typescript': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/language-core': specifier: 1.8.27 version: link:../language-core @@ -265,8 +265,8 @@ importers: packages/typescript-plugin: dependencies: '@volar/typescript': - specifier: ~2.0.2 - version: 2.0.2 + specifier: ~2.1.0 + version: 2.1.0 '@vue/language-core': specifier: 1.8.27 version: link:../language-core @@ -1311,31 +1311,31 @@ packages: pretty-format: 29.7.0 dev: true - /@volar/kit@2.0.2(typescript@5.3.3): - resolution: {integrity: sha512-RgufgQCgsRBrbDmTKhnpsNixFdHAfCnLzKF8Kj4n5HDfWqSGj7WrhnS+qNTbHN7IjbSiSYcSeaO+ZZmXCTT24Q==} + /@volar/kit@2.1.0(typescript@5.3.3): + resolution: {integrity: sha512-F0vfD3QYwNLUWa9ioaoHv/6z+GBqj9TRhOnLEuvEQLhobZo4mNHabikYMQnJFId2z5vHhRRaBZe+6IN9TtI72w==} peerDependencies: typescript: '*' dependencies: - '@volar/language-service': 2.0.2 - '@volar/typescript': 2.0.2 + '@volar/language-service': 2.1.0 + '@volar/typescript': 2.1.0 typesafe-path: 0.2.2 typescript: 5.3.3 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 dev: true - /@volar/language-core@2.0.2: - resolution: {integrity: sha512-sFtXrTDu59wNrUodrOzf62XpVpLAj47vT9P5dbcLxv3YfmbbW8Ssk9aLdqTksKDMhIe+hJVKrQm4UqBJ8iXaig==} + /@volar/language-core@2.1.0: + resolution: {integrity: sha512-BrYEgYHx92ocpt1OUxJs2x3TAXEjpPLxsQoARb96g2GdF62xnfRQUqCNBwiU7Z3MQ/0tOAdqdHNYNmrFtx6q4A==} dependencies: - '@volar/source-map': 2.0.2 + '@volar/source-map': 2.1.0 - /@volar/language-server@2.0.2: - resolution: {integrity: sha512-NbM0v92ppABbZVKSNNPqt2vdBjLQ9O4Oi+iWu4xpCdMZw5GfrTfmhF5nfQQeJ+42XJmlV2pybUOJajLh320D1Q==} + /@volar/language-server@2.1.0: + resolution: {integrity: sha512-7ODGLqlEhlS4kpVyOqHjRh1CLOUHdoIt8/y3pXaqB/ytrl7ZghEQzblYUREpg5iAY7+5FeN53uJ9edjWMXmsfQ==} dependencies: - '@volar/language-core': 2.0.2 - '@volar/language-service': 2.0.2 - '@volar/snapshot-document': 2.0.2 - '@volar/typescript': 2.0.2 + '@volar/language-core': 2.1.0 + '@volar/language-service': 2.1.0 + '@volar/snapshot-document': 2.1.0 + '@volar/typescript': 2.1.0 '@vscode/l10n': 0.0.16 path-browserify: 1.0.1 request-light: 0.7.0 @@ -1344,35 +1344,35 @@ packages: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - /@volar/language-service@2.0.2: - resolution: {integrity: sha512-Ytc3UHWweAxYQSSwmJSl0rNpTVCSzHEu3RJzAkbf/LkSGGJgZ4cxkzuQM0AU1IKsHJl3XCoW0zvArWvtr30JJw==} + /@volar/language-service@2.1.0: + resolution: {integrity: sha512-3BEv8acsPC+ey2Yuecm9lSZp3AT6xq5Tj71TYXoo/TglumHRIa/y0uEIvK4b9okVJo4hgBX0kj9opbgIQrNTtA==} dependencies: - '@volar/language-core': 2.0.2 + '@volar/language-core': 2.1.0 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - /@volar/snapshot-document@2.0.2: - resolution: {integrity: sha512-Wxk64/wWUgYZczCwa9miUeZtKb0V3ZjtrrInmGzY75rXVu0MHxVii5FKYleBWFnpGlu35uqWOB8e+rIH4O96Yw==} + /@volar/snapshot-document@2.1.0: + resolution: {integrity: sha512-7foa5nJ6YGCRUFcafJ8HX9GUfMIi5m/FnOT2mmWH1aBuCnZKu5gTH+2wkpsiyXkuqGlaNHq5q7tu+KL9TUmkpA==} dependencies: vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 - /@volar/source-map@2.0.2: - resolution: {integrity: sha512-jzEQwaAXIq7YJUCU6kvJ0aCfesu/cXT0YrSLxdGa+zxeMa8Q0DtWJE4RlIrvaEtowf9MpcNV7wBXKu4i3R9oTw==} + /@volar/source-map@2.1.0: + resolution: {integrity: sha512-VPyi+DTv67cvUOkUewzsOQJY3VUhjOjQxigT487z/H7tEI8ZFd5RksC5afk3JelOK+a/3Y8LRDbKmYKu1dz87g==} dependencies: muggle-string: 0.4.1 - /@volar/typescript@2.0.2: - resolution: {integrity: sha512-lcCrYdg1ZgKZVm0mnk7pOxBGrojZk/YaeFJdxLH0gd/Kd13Go7uNvfotlYSGQshwHKcbJ0zaqY0et9w9oW1yyA==} + /@volar/typescript@2.1.0: + resolution: {integrity: sha512-2cicVoW4q6eU/omqfOBv+6r9JdrF5bBelujbJhayPNKiOj/xwotSJ/DM8IeMvTZvtkOZkm6suyOCLEokLY0w2w==} dependencies: - '@volar/language-core': 2.0.2 + '@volar/language-core': 2.1.0 path-browserify: 1.0.1 - /@volar/vscode@2.0.2: - resolution: {integrity: sha512-rZYBkbKH55v7qNK59pcRtLrQDgF1W4xhvyx2czgd8C94UK8QTG+piItx2drZSTHBpkQXAZZ54ZlG8g7GnF75PQ==} + /@volar/vscode@2.1.0: + resolution: {integrity: sha512-fJ760pydWAohRJ5PCjZ1M1xDLQhO9Nw0hmQKLo2kI7EEdHc94s+duWI9l0Dz5CVXtkKAkTtW8a48KmGP0Scs+g==} dependencies: - '@volar/language-server': 2.0.2 + '@volar/language-server': 2.1.0 path-browserify: 1.0.1 vscode-languageclient: 9.0.1 vscode-nls: 5.2.0 @@ -4843,109 +4843,110 @@ packages: - terser dev: true - /volar-service-css@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-qgTe7em0HdutJHfAiG4V2xsFYfS+MRC8hGUvPM5ciD39r8IqD1MjxBDWP++9C6q1GK5z2eIedeQZqzlM7b1afQ==} + /volar-service-css@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-YDY+qwqYipkXVwh63f9Lk7x/48j9lsxVeXj9lsj5Fp1VAwpPoVpWQhAq3oNp3my9gyS8lEbdIPl0rJzBcJCuUA==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 vscode-css-languageservice: 6.2.11 + vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 dev: false - /volar-service-emmet@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-CKbroAvQyYVZ4WqCRw7KIytEwx/Kz1Ccb9nWRQZ9kAisNcU3hjYycDacMSILmSfUfgPhr2tbtNLJ9LAQReQJqw==} + /volar-service-emmet@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-d+KfC0axTB6Ku4v70So3GEqsEzrE9zifDvwnqHUrg+Bts05kCFlRgDCLziXmddKhtaaJJ6oSizHr7WcFUyesww==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 '@vscode/emmet-helper': 2.9.2 - volar-service-html: 0.0.28(@volar/language-service@2.0.2) + vscode-html-languageservice: 5.1.1 dev: false - /volar-service-html@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-yIeffFkQESLZ8weP6izRM59oQxnREn3Ep8tesltzMPEbazjRrnJCVF1ZeU0qRJi/HEQNbYqxxc3jJ5J0rR7xcg==} + /volar-service-html@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-duMjl/VLvPWtmYsIAUtwYw/esFY3FWnVmH7537UpnfY9ncYTX/G43xmoVd+oQJPWh7xi8zwFeUQgZAA6T45Bhg==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 vscode-html-languageservice: 5.1.1 + vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 dev: false - /volar-service-json@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-xDNqYEdTNSUThw7ugzKtN3kZ4SJYYJBYWo5Qoo/AuKCLjdapuEBTa15NNpjIM0JsfFvveSJWNEcvX2bAhqG58g==} + /volar-service-json@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-LdADOPbO1+toDP/0oG6plOnzE34tA8oB/aJqdOJFv8OIyMtxn0kCprtyhzVWLMCpz3TgpkBSiAI3BuMMYXcDlQ==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 vscode-json-languageservice: 5.3.7 vscode-uri: 3.0.8 dev: false - /volar-service-pug-beautify@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-EitHuGEw2tl6TDq+7imUlr+rn/tFg/0y2cwD8hPIVd9ziuACVF3hvxMuFwQvF+o69eX3GWir6ZHruIGDoqC47g==} + /volar-service-pug-beautify@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-Y1Dhiipn/+2GNYFxgToSS4DGxDE7rAU5S9rkbleASCksAKFFWknxLF0aBmcvhnDqcVHyvIjoeIqGtQw2xx3wrw==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 dev: false - /volar-service-pug@0.0.28: - resolution: {integrity: sha512-XjoBdVkWmK95jpTGvt0LbMqBr011hmwyCef8JMm8ulB3YIrOv6iQ2UWQcz/OBPqmVZpTLll8Jme3Oq1q5ESZ3g==} + /volar-service-pug@0.0.31: + resolution: {integrity: sha512-hnzdMb9lq74FgKy3LI3nNW4SARWbPy+FwMr6VLaII0R8F3IOvx5w+2nJSzboivPDJ0F5xHASPTWO53G5mXK+vQ==} dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: 0.0.28(@volar/language-service@2.0.2) + volar-service-html: 0.0.31(@volar/language-service@2.1.0) vscode-html-languageservice: 5.1.1 vscode-languageserver-textdocument: 1.0.11 dev: false - /volar-service-typescript-twoslash-queries@0.0.28(@volar/language-service@2.0.2): - resolution: {integrity: sha512-vJD0ezCzYHFYoUZ6kqMYRVuRShMxlKMDjxdT7vcCc+O+VLqOHR7BD4nqd20CxdUtfTPQHHDLnqTF3trkJ0LAvA==} + /volar-service-typescript-twoslash-queries@0.0.31(@volar/language-service@2.1.0): + resolution: {integrity: sha512-NsI1izFST7H6GN7WQow/GEPykPLGt0zlIJl+05bX9W6pXY8kD6PUSz7U+v5TSbUMMmjFFn8IkAAHopbH11OWrA==} peerDependencies: - '@volar/language-service': ~2.0.1 + '@volar/language-service': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 + '@volar/language-service': 2.1.0 dev: false - /volar-service-typescript@0.0.28(@volar/language-service@2.0.2)(@volar/typescript@2.0.2): - resolution: {integrity: sha512-9Z0URkvTCKL6cXBeQ/wsBRSeI/ng9l/cRjQF2WSblldo54ndx2nf8D9XrniTqYJp6xqJDg55gnu6g5Vy1hIB+Q==} + /volar-service-typescript@0.0.31(@volar/language-service@2.1.0)(@volar/typescript@2.1.0): + resolution: {integrity: sha512-gaSsX0NmWgENPx6KrHcj+Xru4iQWDpt1kLJcWYNJZ5XaMawYFlVXjWGX/lCO6P7AoLoc2NQnTYUpgTfTjbqdaQ==} peerDependencies: - '@volar/language-service': ~2.0.1 - '@volar/typescript': ~2.0.1 + '@volar/language-service': ~2.1.0 + '@volar/typescript': ~2.1.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.0.2 - '@volar/typescript': 2.0.2 + '@volar/language-service': 2.1.0 + '@volar/typescript': 2.1.0 path-browserify: 1.0.1 semver: 7.5.4 typescript-auto-import-cache: 0.3.2 vscode-languageserver-textdocument: 1.0.11 vscode-nls: 5.2.0 - vscode-uri: 3.0.8 dev: false /vsce@2.15.0: