Comments (7)
I think exposing an option for the user to put in their modeline is a good solution. It could be empty when idle and contain a simple indicator when something is in progress.
from kakoune-lsp.
Another option could be to show an infobox when the user calls 'go to definition' command so it only informs in case of action.
from kakoune-lsp.
Thanks, both tactics should work well together: option with current status for those who wants to put it into modeline or do any other custom notification and info which explains why actions couldn't be performed right now. For the latter introducing generic error reporting mechanism could be enough (need to double check what exactly language server responds when it's not ready, because it could be not an error but just empty list of declarations/references/etc. In that case we need to track ready event in kak-lsp itself and do smart guess).
from kakoune-lsp.
Or even inform if the server is not running at all
from kakoune-lsp.
I tried to use :lsp-references
with no apparent success on a JavaScript project.
It turns out that:
May 30 12:20:52.463 ERRO Error response from server: Failure { jsonrpc: Some(V2), error: Error { code: MethodNotFound, message: "Unhandled method textDocument/references", data: None }, id: Num(4) }, module: kak_lsp::controller:212
So the problem is that flow-language-server does not support textDocument/references
(yet).
No big deal, the feature will come in due time.
But the lack of error feedback on kakoune side was a bit disturbing.
Here are a few suggestions on top of the great ones in this thread:
- add a line with something like
kak-lsp: no support for lsp-references with flow-language-server
in the*debug*
buffer. - add a new command like
lsp-capabilities
to show what stuffs the current server support.
from kakoune-lsp.
I've added reporting server errors (including unsupported methods) back to editor, both writing them to *debug*
buffer and showing in info box (7ec2e8a). For some of language servers (like cquery) it solves problem of indicating progress because they report an error if they are not ready to give proper response. For others (like rls) it doesn't, because when they are not ready they just give wrong empty response. Progress reporting itself is highly inconsistent across language servers and sometimes have no clear signal of when language server is ready.
I created #51 for lsp-capabilities
.
I'm going to close this issue because problem is mostly solved for "good citizen" type of language servers, for others it should be solved on case-by-case basis. Feel free submit either issue with description how you see progress reporting for language server you use should look like or PR implementing that behaviour. Of course, any ideas about how to improve current "generic" error reporting are welcome as well.
from kakoune-lsp.
ref #196
from kakoune-lsp.
Related Issues (20)
- `Diagnostics` message ignore `lsp_hover_max_lines` HOT 7
- Unable to select message response, quoting issue? HOT 7
- LSP not start properly when receiving a line break at the end of stdout output HOT 1
- `vscode-html-language-server` etc. are incorrectly configured by default HOT 2
- `vscode-html-language-server` blocks Kakoune indefinitely on `lsp-formatting-sync` HOT 1
- gopls inlay hints HOT 3
- LSP not working for rust-analyzer HOT 12
- Extract response from kak-lsp HOT 6
- 'rename-client': client name 'global' is not unique HOT 5
- gopls: evaluate-commands wrong argument count HOT 1
- ANSI-like escaped chars are shown if Korean variable names are hovered HOT 3
- Unused dependency unindent
- Feature Request: Support modifying CodeActionContext HOT 7
- `lsp-code-actions` seems to be broken since `v16.0.0`. HOT 12
- SIGSEGV on lsp-goto-document-symbol HOT 3
- Lexical LS does not load. HOT 5
- Add Biome to example config HOT 2
- Add `zk` to example config HOT 4
- Add Svelte to example config
- Run the LSP only when the roots is found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kakoune-lsp.