Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems when autocomplete entry selected #11088

Closed
krabodyan opened this issue Jul 4, 2024 · 3 comments
Closed

problems when autocomplete entry selected #11088

krabodyan opened this issue Jul 4, 2024 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@krabodyan
Copy link

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("<!-- TODO: document output attributes -->"))
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
video.mp4

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 (2cadec0)

@krabodyan krabodyan added the C-bug Category: This is a bug label Jul 4, 2024
@the-mikedavis
Copy link
Member

Could you build from the latest master and try again? I suspect this was fixed in #10539

@krabodyan
Copy link
Author

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 krabodyan reopened this Jul 4, 2024
@krabodyan
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants