You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During working on Ruby on Rails project with ERB files, Helix freezes and then exits and indefinitely prints the following (I could not stop that, only closing the terminal helps.)
Note to Helix log: I don't have any files named text.html.erb in the project.
Reproduction Steps
I opened a required file with space + f which was created by touch.
Immediately pressed i to get into inserted mode. I wrote the following code:
<%= turbo_stream.replace 'scenarios' %>
<% end %>
Still being in the insert mode, I used ctrl + left arrow to get on the begging of the line, then pressed up arrow and then tab and added a character <. After < I wanted to write '%' and here the crash happens. So this is where it got stuck and crashed:
<%= turbo_stream.replace 'scenarios' %>
<
<% end %>
Helix log
2022-08-18T12:22:02.566 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=11806\n"
2022-08-18T12:27:33.300 helix_view::editor [ERROR] Failed to initialize the LSP for source.toml { cannot find binary path }
2022-08-19T10:16:55.455 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=202627\n"
2022-08-19T11:58:43.747 helix_term::commands [ERROR] Shell error: touch: cannot touch 'app/views/scenarios/index.html.erb': No such file or directory
2022-08-19T11:59:26.933 helix_term::commands [ERROR] Shell error: touch: cannot touch 'app/views/scenarios/index.html.erb': No such file or directory
2022-08-19T12:00:33.030 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-19T12:01:55.370 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:15:49.998 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:16:06.095 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:16:26.594 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=33284\n"
2022-08-22T10:17:33.231 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:19:52.862 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:20:49.929 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:24:25.646 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
2022-08-22T10:38:50.058 helix_view::editor [ERROR] Failed to initialize the LSP for text.html.erb { LSP not defined }
This looks like the same issue as #2997 and #3376 but for the ruby scanner. I don't think it's fixed yet on master in tree-sitter-ruby. I can make a PR later today.
I'll also look around in the grammar sources directory to see if we can find scanners that break on tree-sitter v0.20.8 proactively. There may be a few that need to have their scanners patched.
This loop is slightly different than the others (it looks like tree-sitter isn't repeatedly querying the external scanner here like the others) but tree-sitter-ruby master provides a fix so we should just need to update.
I'm still encountering freezes in the manner described by the original post. (ie. happens when I type < and then % in an html.erb file, where the % never actually goes through).
Update: for anyone else who comes across this, a decent work around (that someone else posted here as well) for the time being is to add some custom auto-pairs to your ERB language configuration:
Summary
During working on Ruby on Rails project with ERB files, Helix freezes and then exits and indefinitely prints the following (I could not stop that, only closing the terminal helps.)
Note to Helix log: I don't have any files named
text.html.erb
in the project.Reproduction Steps
I opened a required file with
space
+f
which was created bytouch
.Immediately pressed
i
to get into inserted mode. I wrote the following code:Still being in the insert mode, I used
ctrl
+left arrow
to get on the begging of the line, then pressedup arrow
and thentab
and added a character<
. After<
I wanted to write '%' and here the crash happens. So this is where it got stuck and crashed:Helix log
2022-08-18T12:22:02.566 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=11806\n"
2022-08-18T12:27:33.300 helix_view::editor [ERROR] Failed to initialize the LSP for
source.toml
{ cannot find binary path }2022-08-19T10:16:55.455 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=202627\n"
2022-08-19T11:58:43.747 helix_term::commands [ERROR] Shell error: touch: cannot touch 'app/views/scenarios/index.html.erb': No such file or directory
2022-08-19T11:59:26.933 helix_term::commands [ERROR] Shell error: touch: cannot touch 'app/views/scenarios/index.html.erb': No such file or directory
2022-08-19T12:00:33.030 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-19T12:01:55.370 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:15:49.998 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:16:06.095 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:16:26.594 helix_lsp::transport [ERROR] err <- "Solargraph is listening on stdio PID=33284\n"
2022-08-22T10:17:33.231 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:19:52.862 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:20:49.929 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:24:25.646 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }2022-08-22T10:38:50.058 helix_view::editor [ERROR] Failed to initialize the LSP for
text.html.erb
{ LSP not defined }Platform
Linux (Ubuntu 20.04.1 LTS)
Terminal Emulator
xterm-256color
Helix Version
helix 22.05 (c18b542)
The text was updated successfully, but these errors were encountered: