@volar/language-server
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -21,48 +21,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
for (const [rootUri, _workspace] of projects.workspaces) { | ||
console.log('workspace: ' + rootUri); | ||
connection.console.log('workspace: ' + rootUri); | ||
const workspace = yield _workspace; | ||
console.log('documentRegistry stats: ' + workspace.documentRegistry.reportStats()); | ||
console.log(''); | ||
console.log('tsconfig: inferred'); | ||
connection.console.log('documentRegistry stats: ' + workspace.documentRegistry.reportStats()); | ||
connection.console.log(''); | ||
connection.console.log('tsconfig: inferred'); | ||
const _inferredProject = workspace.getInferredProjectDontCreate(); | ||
if (_inferredProject) { | ||
console.log('loaded: true'); | ||
connection.console.log('loaded: true'); | ||
const inferredProject = yield _inferredProject; | ||
console.log('largest 10 files:'); | ||
connection.console.log('largest 10 files:'); | ||
for (const script of [...inferredProject.scripts.values()] | ||
.sort((a, b) => { var _a, _b, _c, _d; return ((_b = (_a = b.snapshot) === null || _a === void 0 ? void 0 : _a.getLength()) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = a.snapshot) === null || _c === void 0 ? void 0 : _c.getLength()) !== null && _d !== void 0 ? _d : 0); }) | ||
.slice(0, 10)) { | ||
console.log(' - ' + script.fileName); | ||
console.log(` size: ${(_a = script.snapshot) === null || _a === void 0 ? void 0 : _a.getLength()}`); | ||
connection.console.log(' - ' + script.fileName); | ||
connection.console.log(` size: ${(_a = script.snapshot) === null || _a === void 0 ? void 0 : _a.getLength()}`); | ||
} | ||
console.log('files:'); | ||
connection.console.log('files:'); | ||
for (const script of inferredProject.scripts.values()) { | ||
console.log(' - ' + script.fileName); | ||
console.log(` size: ${(_b = script.snapshot) === null || _b === void 0 ? void 0 : _b.getLength()}`); | ||
console.log(` ref counts: "${(_d = (_c = workspace.documentRegistry).getLanguageServiceRefCounts) === null || _d === void 0 ? void 0 : _d.call(_c, script.fileName, (_f = (_e = inferredProject.languageServiceHost).getScriptKind) === null || _f === void 0 ? void 0 : _f.call(_e, script.fileName))})"`); | ||
connection.console.log(' - ' + script.fileName); | ||
connection.console.log(` size: ${(_b = script.snapshot) === null || _b === void 0 ? void 0 : _b.getLength()}`); | ||
connection.console.log(` ref counts: "${(_d = (_c = workspace.documentRegistry).getLanguageServiceRefCounts) === null || _d === void 0 ? void 0 : _d.call(_c, script.fileName, (_f = (_e = inferredProject.languageServiceHost).getScriptKind) === null || _f === void 0 ? void 0 : _f.call(_e, script.fileName))})"`); | ||
} | ||
} | ||
else { | ||
console.log('loaded: false'); | ||
connection.console.log('loaded: false'); | ||
} | ||
console.log(''); | ||
connection.console.log(''); | ||
for (const _project of workspace.projects.values()) { | ||
const project = yield _project; | ||
console.log('tsconfig: ' + project.tsConfig); | ||
console.log('loaded: ' + !!project.getLanguageServiceDontCreate()); | ||
console.log('largest 10 files:'); | ||
connection.console.log('tsconfig: ' + project.tsConfig); | ||
connection.console.log('loaded: ' + !!project.getLanguageServiceDontCreate()); | ||
connection.console.log('largest 10 files:'); | ||
for (const script of [...project.scripts.values()] | ||
.sort((a, b) => { var _a, _b, _c, _d; return ((_b = (_a = b.snapshot) === null || _a === void 0 ? void 0 : _a.getLength()) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = a.snapshot) === null || _c === void 0 ? void 0 : _c.getLength()) !== null && _d !== void 0 ? _d : 0); }) | ||
.slice(0, 10)) { | ||
console.log(' - ' + script.fileName); | ||
console.log(` size: ${(_g = script.snapshot) === null || _g === void 0 ? void 0 : _g.getLength()}`); | ||
connection.console.log(' - ' + script.fileName); | ||
connection.console.log(` size: ${(_g = script.snapshot) === null || _g === void 0 ? void 0 : _g.getLength()}`); | ||
} | ||
console.log('files:'); | ||
connection.console.log('files:'); | ||
for (const script of project.scripts.values()) { | ||
console.log(' - ' + script.fileName); | ||
console.log(` size: ${(_h = script.snapshot) === null || _h === void 0 ? void 0 : _h.getLength()}`); | ||
console.log(` ref counts: "${(_k = (_j = workspace.documentRegistry).getLanguageServiceRefCounts) === null || _k === void 0 ? void 0 : _k.call(_j, script.fileName, (_m = (_l = project.languageServiceHost).getScriptKind) === null || _m === void 0 ? void 0 : _m.call(_l, script.fileName))})"`); | ||
connection.console.log(' - ' + script.fileName); | ||
connection.console.log(` size: ${(_h = script.snapshot) === null || _h === void 0 ? void 0 : _h.getLength()}`); | ||
connection.console.log(` ref counts: "${(_k = (_j = workspace.documentRegistry).getLanguageServiceRefCounts) === null || _k === void 0 ? void 0 : _k.call(_j, script.fileName, (_m = (_l = project.languageServiceHost).getScriptKind) === null || _m === void 0 ? void 0 : _m.call(_l, script.fileName))})"`); | ||
} | ||
} | ||
console.log(''); | ||
connection.console.log(''); | ||
} | ||
@@ -69,0 +69,0 @@ })); |
@@ -5,3 +5,3 @@ import { LanguageServerPlugin, LanguageServerInitializationOptions } from './types'; | ||
export declare const semanticTokensLegend: vscode.SemanticTokensLegend; | ||
export declare function setupSyntacticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities): void; | ||
export declare function setupSemanticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, options: LanguageServerInitializationOptions, plugins: ReturnType<LanguageServerPlugin>[]): void; | ||
export declare function setupSyntacticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, initOptions: LanguageServerInitializationOptions): void; | ||
export declare function setupSemanticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, initOptions: LanguageServerInitializationOptions, plugins: ReturnType<LanguageServerPlugin>[]): void; |
@@ -46,26 +46,26 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
}; | ||
function setupSyntacticCapabilities(params, server) { | ||
function setupSyntacticCapabilities(params, server, initOptions) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
if ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.selectionRange) { | ||
if (!initOptions.respectClientCapabilities || ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.selectionRange)) { | ||
server.selectionRangeProvider = true; | ||
} | ||
if ((_b = params.textDocument) === null || _b === void 0 ? void 0 : _b.foldingRange) { | ||
if (!initOptions.respectClientCapabilities || ((_b = params.textDocument) === null || _b === void 0 ? void 0 : _b.foldingRange)) { | ||
server.foldingRangeProvider = true; | ||
} | ||
if ((_c = params.textDocument) === null || _c === void 0 ? void 0 : _c.linkedEditingRange) { | ||
if (!initOptions.respectClientCapabilities || ((_c = params.textDocument) === null || _c === void 0 ? void 0 : _c.linkedEditingRange)) { | ||
server.linkedEditingRangeProvider = true; | ||
} | ||
if ((_d = params.textDocument) === null || _d === void 0 ? void 0 : _d.colorProvider) { | ||
if (!initOptions.respectClientCapabilities || ((_d = params.textDocument) === null || _d === void 0 ? void 0 : _d.colorProvider)) { | ||
server.colorProvider = true; | ||
} | ||
if ((_e = params.textDocument) === null || _e === void 0 ? void 0 : _e.documentSymbol) { | ||
if (!initOptions.respectClientCapabilities || ((_e = params.textDocument) === null || _e === void 0 ? void 0 : _e.documentSymbol)) { | ||
server.documentSymbolProvider = true; | ||
} | ||
if ((_f = params.textDocument) === null || _f === void 0 ? void 0 : _f.formatting) { | ||
if (!initOptions.respectClientCapabilities || ((_f = params.textDocument) === null || _f === void 0 ? void 0 : _f.formatting)) { | ||
server.documentFormattingProvider = true; | ||
} | ||
if ((_g = params.textDocument) === null || _g === void 0 ? void 0 : _g.rangeFormatting) { | ||
if (!initOptions.respectClientCapabilities || ((_g = params.textDocument) === null || _g === void 0 ? void 0 : _g.rangeFormatting)) { | ||
server.documentRangeFormattingProvider = true; | ||
} | ||
if ((_h = params.textDocument) === null || _h === void 0 ? void 0 : _h.onTypeFormatting) { | ||
if (!initOptions.respectClientCapabilities || ((_h = params.textDocument) === null || _h === void 0 ? void 0 : _h.onTypeFormatting)) { | ||
// https://github.com/microsoft/vscode/blob/ce119308e8fd4cd3f992d42b297588e7abe33a0c/extensions/typescript-language-features/src/languageFeatures/formatting.ts#L99 | ||
@@ -79,23 +79,23 @@ server.documentOnTypeFormattingProvider = { | ||
exports.setupSyntacticCapabilities = setupSyntacticCapabilities; | ||
function setupSemanticCapabilities(params, server, options, plugins) { | ||
function setupSemanticCapabilities(params, server, initOptions, plugins) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x; | ||
if ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.references) { | ||
if (!initOptions.respectClientCapabilities || ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.references)) { | ||
server.referencesProvider = true; | ||
} | ||
if ((_b = params.textDocument) === null || _b === void 0 ? void 0 : _b.implementation) { | ||
if (!initOptions.respectClientCapabilities || ((_b = params.textDocument) === null || _b === void 0 ? void 0 : _b.implementation)) { | ||
server.implementationProvider = true; | ||
} | ||
if ((_c = params.textDocument) === null || _c === void 0 ? void 0 : _c.definition) { | ||
if (!initOptions.respectClientCapabilities || ((_c = params.textDocument) === null || _c === void 0 ? void 0 : _c.definition)) { | ||
server.definitionProvider = true; | ||
} | ||
if ((_d = params.textDocument) === null || _d === void 0 ? void 0 : _d.typeDefinition) { | ||
if (!initOptions.respectClientCapabilities || ((_d = params.textDocument) === null || _d === void 0 ? void 0 : _d.typeDefinition)) { | ||
server.typeDefinitionProvider = true; | ||
} | ||
if ((_e = params.textDocument) === null || _e === void 0 ? void 0 : _e.callHierarchy) { | ||
if (!initOptions.respectClientCapabilities || ((_e = params.textDocument) === null || _e === void 0 ? void 0 : _e.callHierarchy)) { | ||
server.callHierarchyProvider = true; | ||
} | ||
if ((_f = params.textDocument) === null || _f === void 0 ? void 0 : _f.hover) { | ||
if (!initOptions.respectClientCapabilities || ((_f = params.textDocument) === null || _f === void 0 ? void 0 : _f.hover)) { | ||
server.hoverProvider = true; | ||
} | ||
if ((_g = params.textDocument) === null || _g === void 0 ? void 0 : _g.rename) { | ||
if (!initOptions.respectClientCapabilities || ((_g = params.textDocument) === null || _g === void 0 ? void 0 : _g.rename)) { | ||
server.renameProvider = { | ||
@@ -105,3 +105,3 @@ prepareProvider: true, | ||
} | ||
if ((_h = params.workspace) === null || _h === void 0 ? void 0 : _h.fileOperations) { | ||
if (!initOptions.respectClientCapabilities || ((_h = params.workspace) === null || _h === void 0 ? void 0 : _h.fileOperations)) { | ||
server.workspace = { | ||
@@ -126,3 +126,3 @@ fileOperations: { | ||
} | ||
if ((_j = params.textDocument) === null || _j === void 0 ? void 0 : _j.signatureHelp) { | ||
if (!initOptions.respectClientCapabilities || ((_j = params.textDocument) === null || _j === void 0 ? void 0 : _j.signatureHelp)) { | ||
server.signatureHelpProvider = { | ||
@@ -133,3 +133,3 @@ triggerCharacters: ['(', ',', '<'], | ||
} | ||
if ((_k = params.textDocument) === null || _k === void 0 ? void 0 : _k.completion) { | ||
if (!initOptions.respectClientCapabilities || ((_k = params.textDocument) === null || _k === void 0 ? void 0 : _k.completion)) { | ||
server.completionProvider = { | ||
@@ -150,10 +150,10 @@ // triggerCharacters: '!@#$%^&*()_+-=`~{}|[]\:";\'<>?,./ '.split(''), // all symbols on keyboard | ||
}; | ||
if (options.ignoreTriggerCharacters) { | ||
server.completionProvider.triggerCharacters = (_l = server.completionProvider.triggerCharacters) === null || _l === void 0 ? void 0 : _l.filter(c => !options.ignoreTriggerCharacters.includes(c)); | ||
if (initOptions.ignoreTriggerCharacters) { | ||
server.completionProvider.triggerCharacters = (_l = server.completionProvider.triggerCharacters) === null || _l === void 0 ? void 0 : _l.filter(c => !initOptions.ignoreTriggerCharacters.includes(c)); | ||
} | ||
} | ||
if ((_m = params.textDocument) === null || _m === void 0 ? void 0 : _m.documentHighlight) { | ||
if (!initOptions.respectClientCapabilities || ((_m = params.textDocument) === null || _m === void 0 ? void 0 : _m.documentHighlight)) { | ||
server.documentHighlightProvider = true; | ||
} | ||
if ((_o = params.textDocument) === null || _o === void 0 ? void 0 : _o.documentLink) { | ||
if (!initOptions.respectClientCapabilities || ((_o = params.textDocument) === null || _o === void 0 ? void 0 : _o.documentLink)) { | ||
server.documentLinkProvider = { | ||
@@ -163,6 +163,6 @@ resolveProvider: false, // TODO | ||
} | ||
if ((_p = params.workspace) === null || _p === void 0 ? void 0 : _p.symbol) { | ||
if (!initOptions.respectClientCapabilities || ((_p = params.workspace) === null || _p === void 0 ? void 0 : _p.symbol)) { | ||
server.workspaceSymbolProvider = true; | ||
} | ||
if ((_q = params.textDocument) === null || _q === void 0 ? void 0 : _q.codeLens) { | ||
if (!initOptions.respectClientCapabilities || ((_q = params.textDocument) === null || _q === void 0 ? void 0 : _q.codeLens)) { | ||
server.codeLensProvider = { | ||
@@ -178,3 +178,3 @@ resolveProvider: true, | ||
} | ||
if ((_t = params.textDocument) === null || _t === void 0 ? void 0 : _t.semanticTokens) { | ||
if (!initOptions.respectClientCapabilities || ((_t = params.textDocument) === null || _t === void 0 ? void 0 : _t.semanticTokens)) { | ||
server.semanticTokensProvider = { | ||
@@ -186,3 +186,3 @@ range: true, | ||
} | ||
if ((_u = params.textDocument) === null || _u === void 0 ? void 0 : _u.codeAction) { | ||
if (!initOptions.respectClientCapabilities || ((_u = params.textDocument) === null || _u === void 0 ? void 0 : _u.codeAction)) { | ||
server.codeActionProvider = { | ||
@@ -203,6 +203,6 @@ codeActionKinds: [ | ||
} | ||
if ((_v = params.textDocument) === null || _v === void 0 ? void 0 : _v.inlayHint) { | ||
if (!initOptions.respectClientCapabilities || ((_v = params.textDocument) === null || _v === void 0 ? void 0 : _v.inlayHint)) { | ||
server.inlayHintProvider = true; | ||
} | ||
if (((_w = params.textDocument) === null || _w === void 0 ? void 0 : _w.diagnostic) && ((_x = options.diagnosticModel) !== null && _x !== void 0 ? _x : types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) { | ||
if (!initOptions.respectClientCapabilities || ((_w = params.textDocument) === null || _w === void 0 ? void 0 : _w.diagnostic) && ((_x = initOptions.diagnosticModel) !== null && _x !== void 0 ? _x : types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) { | ||
server.diagnosticProvider = { | ||
@@ -209,0 +209,0 @@ documentSelector: [ |
@@ -52,3 +52,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const serverMode = (_d = options.serverMode) !== null && _d !== void 0 ? _d : types_1.ServerMode.Semantic; | ||
(0, registerFeatures_1.setupSyntacticCapabilities)(params.capabilities, result.capabilities); | ||
(0, registerFeatures_1.setupSyntacticCapabilities)(params.capabilities, result.capabilities, options); | ||
yield _createDocumentServiceHost(); | ||
@@ -86,15 +86,22 @@ if (serverMode === types_1.ServerMode.Semantic) { | ||
} | ||
if ((_h = (_g = params.capabilities.workspace) === null || _g === void 0 ? void 0 : _g.didChangeWatchedFiles) === null || _h === void 0 ? void 0 : _h.dynamicRegistration) { | ||
if (options.serverMode !== types_1.ServerMode.Syntactic | ||
&& !options.disableFileWatcher | ||
&& ((_h = (_g = params.capabilities.workspace) === null || _g === void 0 ? void 0 : _g.didChangeWatchedFiles) === null || _h === void 0 ? void 0 : _h.dynamicRegistration)) { | ||
connection.client.register(vscode.DidChangeWatchedFilesNotification.type, { | ||
watchers: [ | ||
...plugins.map(plugin => plugin.extraFileExtensions.map(ext => ({ globPattern: `**/*.${ext.extension}` }))).flat(), | ||
{ globPattern: '**/*.js' }, | ||
{ globPattern: '**/*.cjs' }, | ||
{ globPattern: '**/*.mjs' }, | ||
{ globPattern: '**/*.ts' }, | ||
{ globPattern: '**/*.cts' }, | ||
{ globPattern: '**/*.mts' }, | ||
{ globPattern: '**/*.jsx' }, | ||
{ globPattern: '**/*.tsx' }, | ||
{ globPattern: '**/*.json' }, | ||
{ | ||
globPattern: `**/*.{${[ | ||
'js', | ||
'cjs', | ||
'mjs', | ||
'ts', | ||
'cts', | ||
'mts', | ||
'jsx', | ||
'tsx', | ||
'json', | ||
...plugins.map(plugin => plugin.extraFileExtensions.map(ext => ext.extension)).flat(), | ||
].join(',')}}` | ||
}, | ||
] | ||
@@ -101,0 +108,0 @@ }); |
@@ -63,2 +63,8 @@ /// <reference types="node" /> | ||
noProjectReferences?: boolean; | ||
reverseConfigFilePriority?: boolean; | ||
disableFileWatcher?: boolean; | ||
/** | ||
* Enable this option to make language server setup server capabilities based on client capabilities to support multiple servers. | ||
*/ | ||
respectClientCapabilities?: boolean; | ||
} |
@@ -15,3 +15,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const callbacks = []; | ||
let cache = {}; | ||
connection.onDidChangeConfiguration(() => __awaiter(this, void 0, void 0, function* () { | ||
cache = {}; | ||
for (const cb of callbacks) { | ||
@@ -29,5 +31,9 @@ cb(); | ||
getConfiguration(section, scopeUri) { | ||
var _a; | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return (_a = (yield connection.workspace.getConfiguration({ scopeUri, section }))) !== null && _a !== void 0 ? _a : undefined /* replace null to undefined */; | ||
if (!scopeUri && ((_a = params.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.didChangeConfiguration)) { | ||
(_b = cache[section]) !== null && _b !== void 0 ? _b : (cache[section] = yield getConfigurationWorker(section, scopeUri)); | ||
return cache[section]; | ||
} | ||
return yield getConfigurationWorker(section, scopeUri); | ||
}); | ||
@@ -39,4 +45,10 @@ }, | ||
}; | ||
function getConfigurationWorker(section, scopeUri) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return (_a = (yield connection.workspace.getConfiguration({ scopeUri, section }))) !== null && _a !== void 0 ? _a : undefined /* replace null to undefined */; | ||
}); | ||
} | ||
} | ||
exports.createConfigurationHost = createConfigurationHost; | ||
//# sourceMappingURL=configurationHost.js.map |
@@ -12,8 +12,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
exports.createNodeFileSystemHost = void 0; | ||
const shared = require("@volar/shared"); | ||
const vscode = require("vscode-languageserver"); | ||
const iterableWeakSet_1 = require("./iterableWeakSet"); | ||
const uriMap_1 = require("./uriMap"); | ||
let currentCwd = ''; | ||
function createNodeFileSystemHost(ts, capabilities) { | ||
const instances = shared.createUriMap(); | ||
const instances = (0, uriMap_1.createUriMap)(); | ||
const onDidChangeWatchedFilesCb = new Set(); | ||
@@ -20,0 +20,0 @@ const caches = new iterableWeakSet_1.IterableWeakSet(); |
@@ -19,2 +19,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const path = require("typesafe-path"); | ||
const uriMap_1 = require("./uriMap"); | ||
function createProject(runtimeEnv, plugins, fsHost, ts, rootUri, tsConfig, tsLocalized, documents, configHost, documentRegistry, cancelTokenHost, serverOptions) { | ||
@@ -28,3 +29,3 @@ return __awaiter(this, void 0, void 0, function* () { | ||
let parsedCommandLine = createParsedCommandLine(ts, sys, shared.getPathOfUri(rootUri.toString()), tsConfig, plugins); | ||
const scripts = shared.createUriMap(); | ||
const scripts = (0, uriMap_1.createUriMap)(); | ||
const languageServiceHost = createLanguageServiceHost(); | ||
@@ -31,0 +32,0 @@ const disposeWatchEvent = fsHost.onDidChangeWatchedFiles(params => { |
@@ -6,2 +6,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
const shared = require("@volar/shared"); | ||
const uriMap_1 = require("./uriMap"); | ||
class IncrementalScriptSnapshot { | ||
@@ -147,3 +148,3 @@ constructor(uri, languageId, version, text) { | ||
function createSnapshots(connection) { | ||
const snapshots = shared.createUriMap(); | ||
const snapshots = (0, uriMap_1.createUriMap)(); | ||
const onDidChangeContents = new Set(); | ||
@@ -150,0 +151,0 @@ const onDidCloses = new Set(); |
@@ -12,3 +12,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
exports.createWebFileSystemHost = void 0; | ||
const shared = require("@volar/shared"); | ||
const path = require("typesafe-path"); | ||
@@ -20,5 +19,6 @@ const vscode_html_languageservice_1 = require("vscode-html-languageservice"); | ||
const utilities_1 = require("./ts/utilities"); | ||
const uriMap_1 = require("./uriMap"); | ||
let currentCwd = '/'; | ||
function createWebFileSystemHost() { | ||
const instances = shared.createUriMap(); | ||
const instances = (0, uriMap_1.createUriMap)(); | ||
const onDidChangeWatchedFilesCb = new Set(); | ||
@@ -25,0 +25,0 @@ const root = { |
@@ -18,2 +18,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const uriMap_1 = require("./uriMap"); | ||
exports.rootTsConfigNames = ['tsconfig.json', 'jsconfig.json']; | ||
@@ -25,3 +26,3 @@ function createWorkspaceProjects(runtimeEnv, plugins, fsHost, rootUri, ts, tsLocalized, documents, configHost, cancelTokenHost, serverOptions) { | ||
const documentRegistry = ts.createDocumentRegistry(sys.useCaseSensitiveFileNames, shared.normalizeFileName(rootUri.fsPath)); | ||
const projects = shared.createUriMap(); | ||
const projects = (0, uriMap_1.createUriMap)(); | ||
const rootTsConfigs = new Set(sys.readDirectory(rootUri.fsPath, exports.rootTsConfigNames, undefined, ['**/*'])); | ||
@@ -142,3 +143,6 @@ const disposeWatch = fsHost.onDidChangeWatchedFiles((params, reason) => __awaiter(this, void 0, void 0, function* () { | ||
if (project) { | ||
const chains = yield getReferencesChains(project.getParsedCommandLine(), rootTsConfig, []); | ||
let chains = yield getReferencesChains(project.getParsedCommandLine(), rootTsConfig, []); | ||
if (serverOptions.reverseConfigFilePriority) { | ||
chains = chains.reverse(); | ||
} | ||
for (const chain of chains) { | ||
@@ -145,0 +149,0 @@ for (let i = chain.length - 1; i >= 0; i--) { |
{ | ||
"name": "@volar/language-server", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"main": "out/index.js", | ||
@@ -20,8 +20,8 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/language-core": "1.0.9", | ||
"@volar/language-service": "1.0.9", | ||
"@volar/shared": "1.0.9", | ||
"request-light": "^0.5.8", | ||
"@volar/language-core": "1.0.10", | ||
"@volar/language-service": "1.0.10", | ||
"@volar/shared": "1.0.10", | ||
"request-light": "^0.6.0", | ||
"typesafe-path": "^0.2.2", | ||
"vscode-html-languageservice": "^5.0.2", | ||
"vscode-html-languageservice": "^5.0.3", | ||
"vscode-languageserver": "^8.0.2", | ||
@@ -32,3 +32,3 @@ "vscode-languageserver-protocol": "^3.17.2", | ||
}, | ||
"gitHead": "be2081f56ce4608324795b8a0ae83c288a3a784d" | ||
"gitHead": "89b82f92fdc30674b03941c5f17c60df8c46211c" | ||
} |
271767
66
5247
+ Added@volar/language-core@1.0.10(transitive)
+ Added@volar/language-service@1.0.10(transitive)
+ Added@volar/shared@1.0.10(transitive)
+ Added@volar/source-map@1.0.10(transitive)
+ Added@volar/transforms@1.0.10(transitive)
+ Added@volar/typescript-faster@1.0.10(transitive)
+ Addedrequest-light@0.6.0(transitive)
- Removed@volar/language-core@1.0.9(transitive)
- Removed@volar/language-service@1.0.9(transitive)
- Removed@volar/shared@1.0.9(transitive)
- Removed@volar/source-map@1.0.9(transitive)
- Removed@volar/transforms@1.0.9(transitive)
- Removed@volar/typescript-faster@1.0.9(transitive)
- Removedrequest-light@0.5.8(transitive)
Updated@volar/language-core@1.0.10
Updated@volar/shared@1.0.10
Updatedrequest-light@^0.6.0