The clientSnippetSupport field is assigned but never actually used. Should it be removed instead?
|
let clientSnippetSupport = false; |
|
let clientDynamicRegisterSupport = false; |
|
|
|
// After the server has started the client sends an initilize request. The server receives |
|
// in the passed params the rootPath of the workspace plus the client capabilities. |
|
let workspaceRoot: URI; |
|
connection.onInitialize((params: InitializeParams): InitializeResult => { |
|
workspaceRoot = URI.parse(params.rootPath); |
|
|
|
function hasClientCapability(...keys: string[]) { |
|
let c = params.capabilities; |
|
for (let i = 0; c && i < keys.length; i++) { |
|
c = c[keys[i]]; |
|
} |
|
return !!c; |
|
} |
|
|
|
clientSnippetSupport = hasClientCapability('textDocument', 'completion', 'completionItem', 'snippetSupport'); |
|
clientDynamicRegisterSupport = hasClientCapability('workspace', 'symbol', 'dynamicRegistration'); |
|
return { |
|
capabilities: { |
|
// Tell the client that the server works in FULL text document sync mode |
|
textDocumentSync: documents.syncKind, |
|
// Disabled because too JSON centric |
|
// completionProvider: { resolveProvider: false }, |
|
hoverProvider: true, |
|
documentSymbolProvider: true, |
|
documentFormattingProvider: false |
|
} |
|
}; |
|
}); |
The
clientSnippetSupportfield is assigned but never actually used. Should it be removed instead?vscode-yaml/server/src/yamlServerMain.ts
Lines 55 to 85 in 7b6097a