Language Server throws when textDocument
client capability is missing
#1251
Labels
bug
Something isn't working
What version of VS Code are you using?
N/A
What version of Tailwind CSS IntelliSense are you using?
0.14.8
What version of Tailwind CSS are you using?
N/A
What package manager are you using?
npm
What operating system are you using?
macOS
Tailwind config
N/A
VS Code settings
N/A
Reproduction
To reproduce, run the
lspx
shell against any version of the language server:Then, when prompted enter the command
initialize({"capabilities": {}})
into the prompt:Describe your issue
The tailwind language server throws an error when there are no
textDocument
capabilities on the client to which it is attached.The spec indicates that textDocument is an optional property https://github.com/microsoft/vscode-languageserver-node/blob/df05883f34b39255d40d68cef55caf2e93cff35f/protocol/src/common/protocol.ts#L1098
While it is very rare that this should happen, it is still a possibility, and the language server should handle it gracefully.
The text was updated successfully, but these errors were encountered: