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
Following the discussions in #5864 and #6224 - completing Elixir's do still messes up indentation on my end, originating from ElixirLS returning offsets without completions.
Reproduction Steps
I tried this:
hx
Navigate to any .ex file
Enter def test do
Apply the do completion
I expected this to happen:
deftestdo|end
Instead, this happened:
deftestdo|end
Helix log
No response
Platform
macOS
Terminal Emulator
Kitty/Alacritty
Helix Version
22.12-383-g98415f28
The text was updated successfully, but these errors were encountered:
this actually... seems kind of correct given how the code was intended. Snippets are generated so newlines are indented to match the start position (which is before do here). However now I tested in vscode and it seems vscode doesn't behave the same.
It seems VScode uses the indentation at the start of the line rather the start of the snippet from my experimentation. This makes sense to me. In that case snippet lines would just act like pressing enter normally would in helix.
In that case we should use TS based indent queries here.
I will try to find out how exactly vscode handles this first
Fixing this was quite easy, I posed #6263. My comment about TS was rubbish, just needed to keep the indentation of the current line (VScode does the same so LS expect that and will add additional indentation themselves)
Summary
Following the discussions in #5864 and #6224 - completing Elixir's
do
still messes up indentation on my end, originating from ElixirLS returning offsets without completions.Reproduction Steps
I tried this:
hx
def test do
do
completionI expected this to happen:
Instead, this happened:
Helix log
No response
Platform
macOS
Terminal Emulator
Kitty/Alacritty
Helix Version
22.12-383-g98415f28
The text was updated successfully, but these errors were encountered: