zed
zed copied to clipboard
Word based suggestions
Check for existing issues
- [X] Completed
Describe the feature
Because some languages are very dynamic (such as Ruby), LSP cannot fully meet the needs of code completion. If it can support Word based suggestions, it will be an effective supplement.
It would be nice to provide options to turn this feature on or off globally or for specific languages.
If applicable, add mockups / screenshots to help present your vision of the feature
Zed
![截屏2023-03-13 14 36 45](https://user-images.githubusercontent.com/49931/224625940-8ed998eb-2040-4031-a5a2-343cb9a3e464.png)
VSCode
![截屏2023-03-13 14 36 22](https://user-images.githubusercontent.com/49931/224625975-e9375dce-b3a3-4a85-8aa1-5195f344472d.png)
I use several languages that Zed doesn't fully support (e.g. Elm). Having a word based autocomplete would make a huge difference.
Thanks for the suggestion @chloerei, this would be a great feature to have in Zed. :)
Just a quick question (while semantic autocompletion is not available in Zed yet): is there a way to use generic semantic autocompletion servers for the languages which have to dedicated language servers?
For example here is a simple completion language server, which successfully works with Helix. I was hoping to enable it for plain text files like this:
// Different settings for specific languages.
"languages": {
"Plain Text": {
"language_servers": ["scls"]
}
}
But this does not seems to work. Is there a way to enable it? Help appreciated, thanks!
Just a quick question (while semantic autocompletion is not available in Zed yet): is there a way to use generic semantic autocompletion servers for the languages which have to dedicated language servers?
For example here is a simple completion language server, which successfully works with Helix. I was hoping to enable it for plain text files like this:
// Different settings for specific languages. "languages": { "Plain Text": { "language_servers": ["scls"] } }
But this does not seems to work. Is there a way to enable it? Help appreciated, thanks!
I simply packaged this LSP: https://github.com/d1y/simple-completion-zed
Hey, thanks a lot, @d1y!
Can you, please, give a bit more installation instructions? I have successfully installed the LSP. What's next? Looks like this is a Zed extension. I tried to install it using the Install Dev Extension
command, but this does not work. Should I compile the extension first?
And another question: how to enable the LSP for specific language (say, for plain text files)?
I tried to install it using the Install Dev Extension command
@VKondakoff Add wasm32-wasi after try install
rustup target add wasm32-wasi
zed: open log
cooperate to view the compilation log
https://github.com/zed-industries/zed/blob/8d390f986df632a77258c94bd7194dd20ef89706/crates/extension/src/extension_builder.rs#L120-L129
how to enable the LSP for specific language (say, for plain text files)?
I have many languages enabled by default (https://github.com/d1y/simple-completion-zed/blob/abe9073176a3804df125b5d25fe82d46385fcc37/extension.toml#L14-L39) But for now I don’t know how to enable plain text 🤔
For information about disabling and enabling a certain language, please see #10906 here
Thanks for helping!
rustup target add wasm32-wasi
Done!
Still no way to install using the Install Dev Extension
command. Here is what I see:
Am I doing something wrong? Maybe extension should be compiled before trying to install it?
@VKondakoff I don't know where you made a mistake, you can go to the discord channel for help
Ahh... Got it working. This was my mistake: after running the Install Dev Extension
command I was expecting to open a file (extension.toml
, for example), while I should open a folder containing the extension. Silly me!
@d1y, thank you for your help and for the extension!