Git Product home page Git Product logo

Comments (7)

occivink avatar occivink commented on June 6, 2024

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.

ervasive avatar ervasive commented on June 6, 2024

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.

ul avatar ul commented on June 6, 2024

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.

ervasive avatar ervasive commented on June 6, 2024

Or even inform if the server is not running at all

from kakoune-lsp.

Delapouite avatar Delapouite commented on June 6, 2024

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.

ul avatar ul commented on June 6, 2024

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.

ul avatar ul commented on June 6, 2024

ref #196

from kakoune-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.