Comments (6)
To add to this, what does work:
from gleam.
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.
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.
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.
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.
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)
- add Option Type to Preluded features HOT 2
- Crash of gleam compiler on windows (VS Code - LSP) HOT 1
- Fix autocompletion of unqualified types in imports sometimes duplicating the `type` keyword.
- Add `let assert ... as` syntax HOT 9
- LSP reports 'no implementation for Erlang' for javascript-only function HOT 2
- Add qualifiers for type variables in generated Erlang typespecs HOT 16
- problem when running the shell command `rebar3` - when running `gleam run` HOT 1
- Certain identifiers named `Maybe` generate invalid Erlang code on Erlang/OTP 27 HOT 5
- Unable use `gleam new` command HOT 2
- LSP: autocompletion types in import statement should account for already-typed `type` keyword HOT 1
- Have the ability to add packages to the wasm compiler HOT 3
- Add support to custom CA certificate stores
- Type constructors are not consistent during equality HOT 2
- Compiler mishandling case statements HOT 3
- Gleam compiler crash when pattern matching bit arrays HOT 3
- LSP: Add Document Symbol support HOT 3
- Pattern matching problem involving improper scoping HOT 1
- gleam add with multiple dependencies HOT 2
- LSP crash in exhaustiveness checker HOT 3
- LSP code action: remove all unused imported types and values
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 gleam.