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
In a file with mixed indent amounts, and a language set (I tried with bash an rust, I'm not sure what the exact conditions are), indent amounts do not match dedent amounts.
Reproduction Steps
With the following file open:
test
file
with
mixed
indents
new line
:set-language bash
ge
<
>>
:set-language rust
<
>>>>
I expected this to happen:
At steps 4 and 7, the indent amount matches the dedent amount in the preceding step
Instead, this happened:
At step 3. the dedent amount is 2 spaces. At step 4, the indent amount is 1 space.
At step 6, the dedent amount is 4 spaces. At step 7, the indent amount is 1 space.
Helix log
n/a
Platform
Windows (WSL: ubuntu)
Terminal Emulator
Windows Terminal Version: 1.14.1962.0
Helix Version
22.05-367-g63ec1095
The text was updated successfully, but these errors were encountered:
I've had this issue as well, with different languages. Most notably on a pull request branch that's working on Python indentation. So I suspect it's an issue with tree-sitter indent.scm file, but I'm not sure.
I've seen this bug too but it doesn't have anything to do with the indent.scm queries since those are only used to determine the indentation of a new line. I guess there is a bug somewhere in the indent/unindent functions in helix-term/src/commands.rs. Both functions are pretty short so it might not be too difficult to find it.
Summary
In a file with mixed indent amounts, and a language set (I tried with bash an rust, I'm not sure what the exact conditions are), indent amounts do not match dedent amounts.
Reproduction Steps
With the following file open:
:set-language bash
ge
<
>>
:set-language rust
<
>>>>
I expected this to happen:
At steps 4 and 7, the indent amount matches the dedent amount in the preceding step
Instead, this happened:
At step 3. the dedent amount is 2 spaces. At step 4, the indent amount is 1 space.
At step 6, the dedent amount is 4 spaces. At step 7, the indent amount is 1 space.
Helix log
n/a
Platform
Windows (WSL: ubuntu)
Terminal Emulator
Windows Terminal Version: 1.14.1962.0
Helix Version
22.05-367-g63ec1095
The text was updated successfully, but these errors were encountered: