-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
newline at eof in justfile creates livelock #8226
Comments
its a problem with the treesitter grammar not the LSP. In general I found the TS grammar for the justfile fairly immature (not that surprising as its a bit niche) |
I have a similar issue in markdown documents. Looking at the Is there some way the editor could be changed to not run into this issue? I would like to help with this if possible, this issue affects my daily work. |
Hangs like this need to be fixed upstream in tree-sitter-just (or tree-sitter-markdown in that case) |
I think that is likely #8709. The justice grammar has some problems which need to be fixed and we can't do anything about that. I don't think markdown does tough. If you are using the latest release building from source instead should be enough |
Summary
I think there is a livelock, when adding a newline at the end of a justfile.
Helix hangs and I could only kill it externally.
I can only guess that it maybe has something to do with lsp for justfiles?
Logfile with -vvv did not produce useful information afaik, see below.
Windows Terminal version: 1.17.11461.0
Nushell version: 0.84.0
Reproduction Steps
I tried this:
hx
ihello:<enter><tab>echo bla<esc>:w justfile<enter>o
I expected this to happen:
newline at the end of the file
Instead, this happened:
helix hangs with high CPU usage
Alternative tests:
when instead of pressing
o
in the end, I just move the cursor, everything is fine. I can also add a line (O
instead ofo
) above the last line no problem.Alternative to pressing
o
in the end: pressingA
(this is fine) and then<enter>
(the newline seems to be the problem).Helix log
~/.cache/helix/helix.log
2023-09-09T23:07:28.461 helix_vcs [INFO] file is untracked 2023-09-09T23:07:28.461 helix_vcs [INFO] failed to open diff base for C:\Users\Jonathan\Documents\rust\sandbox\justfile 2023-09-09T23:07:28.464 helix_view::editor [DEBUG] editor status: Loaded 1 file. 2023-09-09T23:07:28.464 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 0ns) 2023-09-09T23:07:28.464 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0 2023-09-09T23:07:28.466 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0 2023-09-09T23:07:28.818 helix_term::application [DEBUG] received editor event: IdleTimer 2023-09-09T23:07:29.092 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0 2023-09-09T23:07:29.308 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0 2023-09-09T23:07:29.710 helix_term::application [DEBUG] received editor event: IdleTimerPlatform
Windows
Terminal Emulator
Windows Terminal with nushell
Helix Version
helix 23.05 (7f5940b)
The text was updated successfully, but these errors were encountered: