helix-editor / helix

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

problems when autocomplete entry selected #11088

Closed krabodyan closed 1 month ago

krabodyan commented 1 month ago

Summary

When selecting any entry in lsp popup, helix spams messages error messages [ERROR] Tried sending response into a closed channel (id=Num(13)), original request likely timed out few times per second while any entry is selected. Happens with pyright 1.1.369, pylsp v1.11.0 and bash-language-server 5.4.0. Other servers are not tested. When using nil 2023-08-09 this problem disappears, but not completely.

Also I found that not all documentation from lsp is shown. For example, when using pylsp or pyright, and select some entry from autocomplete popup, it will dont show documentation popup. When using bash-language-server and select some entry from autocomplete popup, it will show docs only for snippets. But for keywords it will show nothing. Although at the same time messages with necessary documentation are output to the log file and can be shown using space+k keybind. The only lsp i found to working with docs correctry is nil. But signature from autocomplete is not fully displayed and not scrollable

nix autocomplete small window size screenshot
nix autocomplete big window size screenshot
nix show documentation by space+k keybind screenshot
python autocomplete screenshot
python show documentation by space+k keybind screenshot
sh autocomplete screenshot

As you can see, for all languages lsp returns correct documentation. But helix shows it only for nix file. Also, when autocomplete entry is selected, for some reason helix start to update it few times per secord:

logs ``` 2024-07-04T14:56:42.034 helix_term::ui::markdown [WARN] unhandled markdown event InlineHtml(Borrowed("")) 2024-07-04T14:56:42.186 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 3 ```

Just see the speed how it spams log file

video

Reproduction Steps

I tried this: 1. setup hx with `bash-language-server` or `pyright` 2. `hx < .py | .sh | but not a .nix file >` 3. select some autocomplete entry and do nothing else. When open file and type keyword or etc I expected this to happen: autocomplete and documentation popup works as it should; no errors in log file Instead, this happened: autocomplete works but spams errors few time per second in log file, documentation works not always and not right; ### Helix log https://gist.github.com/krabodyan/458f1f30d733cd405d0cef77bb9c12a9 ### Platform Linux ### Terminal Emulator foot version: 1.17.2 +pgo +ime +graphemes -assertions | alacritty 0.13.2 | kitty 0.35.2 | wezterm 20240203-110809-5046fc22 ### Installation Method nixpkgs unstable ### Helix Version helix 24.3 (2cadec0b)
the-mikedavis commented 1 month ago

Could you build from the latest master and try again? I suspect this was fixed in https://github.com/helix-editor/helix/pull/10539

krabodyan commented 1 month ago

installed via flake and its working almost perfect, but:

  1. scroll in autocomplete signature still dont working
  2. And when python, syntax highlight in autocomplete signature dont working, unlike nix, bash or space+k show docs keybind (mb its pyright problem but show docs working meanwhile)
    screenshot
  3. from errors/warnings in log file left only error from nil (version 2023-08-09)
    
    2024-07-04T17:32:02.628 helix_lsp::transport [ERROR] nil err: <- StreamClosed
    2024-07-04T17:32:02.628 helix_lsp::transport [ERROR] err: <- Other(failed to send a message to server

Caused by: channel closed)

krabodyan commented 1 month ago

switched to pylsp instead of pyright, syntax highlight in autocomplete works perfectly, thank you