Coder Social home page Coder Social logo

Comments (6)

dvic avatar dvic commented on July 4, 2024

To add to this, what does work:

Type digits:
image

Select next suggestion:
image

from gleam.

lpil avatar lpil commented on July 4, 2024

Hello! This is a bug in the LSP specification unfortunately. How completions are applied is ambiguous in the spec so different editors do different things here. VS Code and Zed and Helix duplicate the module qualifier, others do not.

This feature is going to be rewritten to not use this part of the spec, but again unfortunately the LSP API that is not ambiguous requires a good deal more work to implement.

from gleam.

dvic avatar dvic commented on July 4, 2024

This feature is going to be rewritten to not use this part of the spec, but again unfortunately the LSP API that is not ambiguous requires a good deal more work to implement.

Clear. Out of curiosity, what part of the spec are we talking about here? Have you considered using https://github.com/elixir-tools/gen_lsp to handle the generic LSP stuff?

Edit: I see now that there is also an option Rust: https://github.com/ebkalderon/tower-lsp

from gleam.

lpil avatar lpil commented on July 4, 2024

That doesn't help with this problem in any way, and I think async Rust is not well suited to a language server as it is CPU bound and only has one client at a time. It adds a lot of complexity in exchange for nothing that I can see.

Implementing the protocol is quite trivial, it's just JSON RPC over stdio. It's the logic behind it that is the hard bit.

from gleam.

dvic avatar dvic commented on July 4, 2024

That doesn't help with this problem in any way, and I think async Rust is not well suited to a language server as it is CPU bound and only has one client at a time. It adds a lot of complexity in exchange for nothing that I can see.

Ah okay.

Implementing the protocol is quite trivial. It's the logic behind it that is the hard bit.

I'd like to help out with fixing this particular issue. Is there anything I can do? You mentioned that this feature is going to be rewritten to not use this part of the spec; is it now a bad time to have a look at this? Or is the mentioned rewrite something for the long-run and I can have a look at the issue now already with the existing codebase?

from gleam.

lpil avatar lpil commented on July 4, 2024

We need to move from the simple completion API to providing text-edits which delete the qualifier. No one has yet done any work on how we're going to determine what the edits are yet. Your help would be super appreciated!!

from gleam.

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.