helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.96k stars 2.43k forks source link

Helix does not handle CompletionList::`is_incomplete` #9797

Open Feel-ix-343 opened 6 months ago

Feel-ix-343 commented 6 months ago

Summary

My language server moxide frequently uses is_incomplete as it filters the (many thousands) of completions on the server before sending to the client.

As shown in the video, it seems that helix does not respond to is_incomplete (except when the helix lsp client has filtered out all completions). The video compares helix to neovim with nvim-cmp

helixdemo

Reproduction Steps

Install markdown oxide cargo install --git https://github.com/Feel-ix-343/markdown-oxide.git markdown-oxide

Launch helix in a vault of md files; You can test on the same files as I did by cloning the https://github.com/Feel-ix-343/markdown-oxide/tree/main/TestFiles folder and launching from there. You may need to initialize git in that folder after cloning

Helix log

~/.cache/helix/helix.log ``` please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines ```

Platform

Linux

Terminal Emulator

alacritty

Installation Method

arch linux helix-git

Helix Version

23.10 (cc43e352)

pascalkuthe commented 6 months ago

This is jtoa bug but a feature we simply didn't implement yet. It was very hard to do woth the old completion infrastructure. #8021 revamped the infrastructure so it should be possible now but it won't be trivial

Feel-ix-343 commented 6 months ago

Yea I saw the TODO comment haha when looking through the code

How shall we move forward with this?

pascalkuthe commented 6 months ago

well inI definitly want to see it implemented I just haven't been able to find the time to work on it yet. If somebody else puts forward a high quality implementation that would be great otherwise it can take some time

Feel-ix-343 commented 4 months ago

I'm working on a real implementation.

I currently have a working version with good design; I will clean it up and make a new PR soon.

Feel-ix-343 commented 4 months ago

One confusing piece of behavior I ran into was the default completion_trigger_len of 2.

This default is something I have never encountered in nvim-cmp, vscode, jetbrains ... and I wonder if it should be the default?

Of course, I will be happy to instruct that users configure the default to 1 in my language server's repo...

Feel-ix-343 commented 3 months ago

:+1: