Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending workspace/configuration requests to client without capability #291

Open
areynoua opened this issue Dec 8, 2023 · 0 comments
Open
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)

Comments

@areynoua
Copy link

areynoua commented Dec 8, 2023

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"}]}}

Version information

  • Operating system: Linux Mint 21.2
  • ltex-ls: 16.0.0
  • Java: 11.0.12
@areynoua areynoua added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)
Projects
None yet
Development

No branches or pull requests

1 participant