mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 21:39:43 +00:00
[json] update service. Fixes #53605
This commit is contained in:
parent
d49a98caa6
commit
8229aed327
|
@ -101,7 +101,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vscode-extension-telemetry": "0.0.18",
|
"vscode-extension-telemetry": "0.0.18",
|
||||||
"vscode-languageclient": "^4.4.0",
|
"vscode-languageclient": "^4.4.2",
|
||||||
"vscode-nls": "^3.2.4"
|
"vscode-nls": "^3.2.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsonc-parser": "^2.0.1",
|
"jsonc-parser": "^2.0.1",
|
||||||
"request-light": "^0.2.3",
|
"request-light": "^0.2.3",
|
||||||
"vscode-json-languageservice": "^3.1.4",
|
"vscode-json-languageservice": "^3.1.5",
|
||||||
"vscode-languageserver": "^4.4.0",
|
"vscode-languageserver": "^4.4.2",
|
||||||
"vscode-nls": "^3.2.4",
|
"vscode-nls": "^3.2.4",
|
||||||
"vscode-uri": "^1.0.5"
|
"vscode-uri": "^1.0.5"
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,6 +59,7 @@ documents.listen(connection);
|
||||||
let clientSnippetSupport = false;
|
let clientSnippetSupport = false;
|
||||||
let clientDynamicRegisterSupport = false;
|
let clientDynamicRegisterSupport = false;
|
||||||
let foldingRangeLimit = Number.MAX_VALUE;
|
let foldingRangeLimit = Number.MAX_VALUE;
|
||||||
|
let hierarchicalDocumentSymbolSupport = false;
|
||||||
|
|
||||||
// After the server has started the client sends an initialize request. The server receives
|
// After the server has started the client sends an initialize request. The server receives
|
||||||
// in the passed params the rootPath of the workspace plus the client capabilities.
|
// in the passed params the rootPath of the workspace plus the client capabilities.
|
||||||
|
@ -79,6 +80,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
|
||||||
clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
|
clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
|
||||||
clientDynamicRegisterSupport = getClientCapability('workspace.symbol.dynamicRegistration', false);
|
clientDynamicRegisterSupport = getClientCapability('workspace.symbol.dynamicRegistration', false);
|
||||||
foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
|
foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
|
||||||
|
hierarchicalDocumentSymbolSupport = getClientCapability('textDocument.documentSymbol.hierarchicalDocumentSymbolSupport', false);
|
||||||
const capabilities: ServerCapabilities = {
|
const capabilities: ServerCapabilities = {
|
||||||
// Tell the client that the server works in FULL text document sync mode
|
// Tell the client that the server works in FULL text document sync mode
|
||||||
textDocumentSync: documents.syncKind,
|
textDocumentSync: documents.syncKind,
|
||||||
|
@ -342,7 +344,11 @@ connection.onDocumentSymbol((documentSymbolParams, token) => {
|
||||||
const document = documents.get(documentSymbolParams.textDocument.uri);
|
const document = documents.get(documentSymbolParams.textDocument.uri);
|
||||||
if (document) {
|
if (document) {
|
||||||
const jsonDocument = getJSONDocument(document);
|
const jsonDocument = getJSONDocument(document);
|
||||||
return languageService.findDocumentSymbols(document, jsonDocument);
|
if (hierarchicalDocumentSymbolSupport) {
|
||||||
|
return languageService.findDocumentSymbols2(document, jsonDocument);
|
||||||
|
} else {
|
||||||
|
return languageService.findDocumentSymbols(document, jsonDocument);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
|
}, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
|
||||||
|
|
|
@ -62,12 +62,12 @@ request-light@^0.2.3:
|
||||||
https-proxy-agent "^2.2.1"
|
https-proxy-agent "^2.2.1"
|
||||||
vscode-nls "^3.2.2"
|
vscode-nls "^3.2.2"
|
||||||
|
|
||||||
vscode-json-languageservice@^3.1.4:
|
vscode-json-languageservice@^3.1.5:
|
||||||
version "3.1.4"
|
version "3.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.1.4.tgz#72e84e2754ad117f9e8d36876c1a66fe16234235"
|
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.1.5.tgz#4ebac4cadcaedd55ea2d0716259b50a89955e00e"
|
||||||
dependencies:
|
dependencies:
|
||||||
jsonc-parser "^2.0.1"
|
jsonc-parser "^2.0.1"
|
||||||
vscode-languageserver-types "^3.10.0"
|
vscode-languageserver-types "^3.10.1"
|
||||||
vscode-nls "^3.2.4"
|
vscode-nls "^3.2.4"
|
||||||
vscode-uri "^1.0.5"
|
vscode-uri "^1.0.5"
|
||||||
|
|
||||||
|
@ -75,32 +75,28 @@ vscode-jsonrpc@^3.6.2:
|
||||||
version "3.6.2"
|
version "3.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
||||||
|
|
||||||
vscode-languageserver-protocol@^3.10.0:
|
vscode-languageserver-protocol@^3.10.3:
|
||||||
version "3.10.0"
|
version "3.10.3"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.0.tgz#f8dcdf987687f64a26e7c32d498fc781a0e886dc"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.3.tgz#59841c9602a6a6baab68613c2a47760994657196"
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-jsonrpc "^3.6.2"
|
vscode-jsonrpc "^3.6.2"
|
||||||
vscode-languageserver-types "^3.10.0"
|
vscode-languageserver-types "^3.10.1"
|
||||||
|
|
||||||
vscode-languageserver-types@^3.10.0:
|
vscode-languageserver-types@^3.10.1:
|
||||||
version "3.10.0"
|
version "3.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.0.tgz#944e5308f3b36a3f372c766f1a344e903ec9c389"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.1.tgz#d5d5f44f688a3b2aa9857dc53cb9cacca73fe35a"
|
||||||
|
|
||||||
vscode-languageserver@^4.4.0:
|
vscode-languageserver@^4.4.2:
|
||||||
version "4.4.0"
|
version "4.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-4.4.0.tgz#b6e8b37a739ccb629d92f3635f0099d191c856fa"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-4.4.2.tgz#600ae9cc7a6ff1e84d93c7807840c2cb5b22821b"
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageserver-protocol "^3.10.0"
|
vscode-languageserver-protocol "^3.10.3"
|
||||||
vscode-uri "^1.0.3"
|
vscode-uri "^1.0.5"
|
||||||
|
|
||||||
vscode-nls@^3.2.2, vscode-nls@^3.2.4:
|
vscode-nls@^3.2.2, vscode-nls@^3.2.4:
|
||||||
version "3.2.4"
|
version "3.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.4.tgz#2166b4183c8aea884d20727f5449e62be69fd398"
|
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.4.tgz#2166b4183c8aea884d20727f5449e62be69fd398"
|
||||||
|
|
||||||
vscode-uri@^1.0.3:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.3.tgz#631bdbf716dccab0e65291a8dc25c23232085a52"
|
|
||||||
|
|
||||||
vscode-uri@^1.0.5:
|
vscode-uri@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.5.tgz#3b899a8ef71c37f3054d79bdbdda31c7bf36f20d"
|
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-1.0.5.tgz#3b899a8ef71c37f3054d79bdbdda31c7bf36f20d"
|
||||||
|
|
|
@ -38,22 +38,22 @@ vscode-jsonrpc@^3.6.2:
|
||||||
version "3.6.2"
|
version "3.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz#3b5eef691159a15556ecc500e9a8a0dd143470c8"
|
||||||
|
|
||||||
vscode-languageclient@^4.4.0:
|
vscode-languageclient@^4.4.2:
|
||||||
version "4.4.0"
|
version "4.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-4.4.0.tgz#b05868f6477b6f0c9910b24daae4f3e8c4b65902"
|
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-4.4.2.tgz#a341a7b4ac403e481f011ed4572854646e8968c4"
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageserver-protocol "^3.10.0"
|
vscode-languageserver-protocol "^3.10.3"
|
||||||
|
|
||||||
vscode-languageserver-protocol@^3.10.0:
|
vscode-languageserver-protocol@^3.10.3:
|
||||||
version "3.10.0"
|
version "3.10.3"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.0.tgz#f8dcdf987687f64a26e7c32d498fc781a0e886dc"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.10.3.tgz#59841c9602a6a6baab68613c2a47760994657196"
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-jsonrpc "^3.6.2"
|
vscode-jsonrpc "^3.6.2"
|
||||||
vscode-languageserver-types "^3.10.0"
|
vscode-languageserver-types "^3.10.1"
|
||||||
|
|
||||||
vscode-languageserver-types@^3.10.0:
|
vscode-languageserver-types@^3.10.1:
|
||||||
version "3.10.0"
|
version "3.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.0.tgz#944e5308f3b36a3f372c766f1a344e903ec9c389"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.10.1.tgz#d5d5f44f688a3b2aa9857dc53cb9cacca73fe35a"
|
||||||
|
|
||||||
vscode-nls@^3.2.4:
|
vscode-nls@^3.2.4:
|
||||||
version "3.2.4"
|
version "3.2.4"
|
||||||
|
|
Loading…
Reference in a new issue