{
"capabilities": {
"foldingrangeprovider": true,
"codeactionprovider": {
"codeactionkinds": ["quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeimports"],
"resolveprovider": true
},
"signaturehelpprovider": {
"triggercharacters": ["("]
},
"colorprovider": true,
"semantictokensprovider": {
"legend": {
"tokenmodifiers": ["declaration", "static", "async", "readonly", "defaultlibrary", "local", "refvalue"],
"tokentypes": ["class", "enum", "interface", "namespace", "typeparameter", "type", "parameter", "variable", "enummember", "property", "function", "method"]
},
"range": true,
"full": true
},
"workspace": {
"fileoperations": {
"willrename": {
"filters": [
{
"pattern": {
"glob": "**/*.{ts,js,vue}"
}
}
]
}
},
"workspacefolders": {
"changenotifications": true,
"supported": true
}
},
"completionprovider": {
"triggercharacters": [".", ":", "<", "\"", "'", "/", "@", "*", " "],
"resolveprovider": true
},
"hoverprovider": true,
"executecommandprovider": {
"commands": []
},
"documentlinkprovider": {
"resolveprovider": false
},
"referencesprovider": true,
"definitionprovider": true,
"documenthighlightprovider": true,
"textdocumentsync": {
"didclose": {},
"save": {},
"didopen": {},
"change": {
"synckind": 2
}
},
"documentformattingprovider": false,
"documentsymbolprovider": true
}
}
LSP clients(like Sublime Text), won't send server requests if the server didn't announce support for those requests through capabilities.
Currently the Volar server only announces this capability:
https://github.com/johnsoncodehk/volar/blob/8733e9483389d9567525f0493b56697fe8f2c35a/packages/server/src/index.ts#L34-L36
But it should actually include lots of other capabilities.
Here is an example of what the Vetur server returns:
Details
Note: I accidentally lowercased all the object keys :)
{ "capabilities": { "foldingrangeprovider": true, "codeactionprovider": { "codeactionkinds": ["quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeimports"], "resolveprovider": true }, "signaturehelpprovider": { "triggercharacters": ["("] }, "colorprovider": true, "semantictokensprovider": { "legend": { "tokenmodifiers": ["declaration", "static", "async", "readonly", "defaultlibrary", "local", "refvalue"], "tokentypes": ["class", "enum", "interface", "namespace", "typeparameter", "type", "parameter", "variable", "enummember", "property", "function", "method"] }, "range": true, "full": true }, "workspace": { "fileoperations": { "willrename": { "filters": [ { "pattern": { "glob": "**/*.{ts,js,vue}" } } ] } }, "workspacefolders": { "changenotifications": true, "supported": true } }, "completionprovider": { "triggercharacters": [".", ":", "<", "\"", "'", "/", "@", "*", " "], "resolveprovider": true }, "hoverprovider": true, "executecommandprovider": { "commands": [] }, "documentlinkprovider": { "resolveprovider": false }, "referencesprovider": true, "definitionprovider": true, "documenthighlightprovider": true, "textdocumentsync": { "didclose": {}, "save": {}, "didopen": {}, "change": { "synckind": 2 } }, "documentformattingprovider": false, "documentsymbolprovider": true } }Additional context:
Even when I add a completion capability for completions:
When a LSP client sends a request to Volar,
Volar returns this error:
So even when Volar has specified capabilities, the server still will not work with other LSP clients (just yet :). Do you have any idea why?