LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
Describe the bug
When used with a client without the workspace/configuration capability (as here), ltex-ls should not send workspace/configuration requests, but assume default configuration and overrides from previous workspace/didChangeConfiguration.
Steps to reproduce
In ale, you can easily add LTex as a lsp by copy pasting the ale_linter/tex/texlab.vim file and s/texlab/ltex_ls/g. You may just need to add \ 'language': 'latex', in the call to Define.
Expected behavior
LTex should not send workspace/configuration requests to clients that do not support them.
LTeX configuration
This seems to occur with and without settings.json file.
LTeX LS log
```
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Content-Length: 1287
{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"initializationOptions":{},"rootUri":"file:///tmp/test","capabilities":{"workspace":{"workspaceFolders":false,"configuration":false,"symbol":{"dynamicRegistration":false},"applyEdit":false,"didChangeConfiguration":{"dynamicRegistration":false}},"textDocument":{"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":false},"references":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":true},"rename":{"dynamicRegistration":false},"completion":{"completionItem":{"snippetSupport":false,"commitCharactersSupport":false,"preselectSupport":false,"deprecatedSupport":false,"documentationFormat":["plaintext","markdown"]},"contextSupport":false,"dynamicRegistration":false},"synchronization":{"didSave":true,"willSaveWaitUntil":false,"willSave":false,"dynamicRegistration":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":[]}},"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"hover":{"dynamicRegistration":false,"contentFormat":["plaintext","markdown"]},"implementation":{"dynamicRegistration":false,"linkSupport":false},"definition":{"dynamicRegistration":false,"linkSupport":false}}},"rootPath":"/tmp/test","processId":124201}}déc. 08, 2023 4:34:24 PM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 16.0.0 - initializing...
Content-Length: 260
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":1,"completionProvider":{},"codeActionProvider":{"codeActionKinds":["quickfix.ltex.acceptSuggestions"]},"executeCommandProvider":{"commands":["_ltex.checkDocument","_ltex.getServerStatus"]}}}}Content-Length: 52
{"method":"initialized","jsonrpc":"2.0","params":{}}Content-Length: 220
{"method":"workspace/didChangeConfiguration","jsonrpc":"2.0","params":{"settings":{"ltex.ltex-ls.logLevel":"finest","ltex.language":"en-US","ltex.motherTongue":"fr","ltex.enablePickyRules":"true","ltex.enabled":"true"}}}Content-Length: 2856
{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///tmp/test/abstract.tex","version":2,"languageId":"latex","text":"\\documentclass[letterpaper]{article}\n\\usepackage{geometry}\n\\pagestyle{empty}\n"}}}Content-Length: 144
{"jsonrpc":"2.0","id":"1","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///tmp/test/abstract.tex","section":"ltex"}]}}
```
Describe the bug When used with a client without the
workspace/configuration
capability (as here), ltex-ls should not sendworkspace/configuration
requests, but assume default configuration and overrides from previousworkspace/didChangeConfiguration
.Steps to reproduce In ale, you can easily add LTex as a lsp by copy pasting the ale_linter/tex/texlab.vim file and
s/texlab/ltex_ls/g
. You may just need to add\ 'language': 'latex',
in the call to Define.Expected behavior LTex should not send
workspace/configuration
requests to clients that do not support them.LTeX configuration This seems to occur with and without
settings.json
file.LTeX LS log
Version information