-
Notifications
You must be signed in to change notification settings - Fork 454
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
LSP not compatible with Kate #6000
Comments
The LSP spec supports most of the parameters used in initialization. Does lean lsp not like a particular field in the payload? |
Could you try this on v4.14.0-rc2 as well? |
lean4/src/Lean/Data/Lsp/InitShutdown.lean Line 58 in 85f2213
/- Many of these params can be null instead of not present.
For ease of implementation, we're liberal:
missing params, wrong json types and null all map to none,
even if LSP sometimes only allows some subset of these.
In cases where LSP makes a meaningful distinction
between different kinds of missing values, we'll
follow accordingly. -/ I'll try the binary build from https://github.com/leanprover/lean4/releases/tag/v4.14.0-rc2 and post an update |
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Lean4 LSP does not work with Kate's LSP plugin. I understand Lean does not officially support all text editors, but I expected using
lean --server
to work. Kate works with about 20 other LSP servers, so I assume something's odd here.Watchdog error: Cannot read LSP request: Unexpected param '{"workspaceFolders":[],"rootUri":"file:///home/user","rootPath":"/home/user","processId":13066,"capabilities":{"workspace":{"workspaceFolders":true},"window":{"workDoneProgress":true,"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}}},"textDocument":{"synchronization":{"didSave":true},"semanticTokens":{"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":[],"requests":{"range":true,"full":{"delta":true}},"formats":["relative"]},"selectionRange":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":true},"inlayHint":{"dynamicRegistration":false},"hover":{"contentFormat":["markdown","plaintext"]},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"completion":{"completionItem":{"snippetSupport":true,"resolveSupport":{"properties":["additionalTextEdits","documentation"]}}},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","source"]}}}}}}' for method 'initialize'
Context
I am trying to use Lean LSP with new text editors
Steps to Reproduce
Lean
for*.lean
Expected behavior: LSP server works and highlights code
Actual behavior: LSP server crashes
Versions
Lean (version 4.13.0, x86_64-unknown-linux-gnu, commit 6d22e0e, Release)
The text was updated successfully, but these errors were encountered: