-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"git-commit"
language ignores indent setting in languages.toml
#12783
Comments
git-commit
"git-commit"
language ignores indent setting in languages.toml
Unable to reproduce (tab works with OP |
i think i found the underlying issue: i use $ git clone https://github.com/m4rch3n1ng/mayland # or any other rust repository that uses tabs
$ cd mayland
$ git -c core.editor=helix commit --amend --verbose |
With |
We auto-detect the indentation of a file and this sometimes produces bad interpretations, also see #9556 Aside from short files we should probably also try to ignore comments in the calculation, and treat the part after the scissors in the commit message as a sort of block comment |
I had a go in #12810. It effectively skews the indent heuristic to only prefer guessing if the amount of indent of a type exceeds the amount of lines with no indents at all. |
my
languages.toml
looks like this:but when i want to edit a git commit message (via e.g.
git -c core.editor=helix commit --amend
) it still uses 1 space indentation (pressing tab inserts one space, and:indent-style
returns"1 space"
)it is very possible that i a doing something wrong, but currently the only way i have found to fix that is by manually setting
:indent-style t 4
every time i want to edit a git commit message.The text was updated successfully, but these errors were encountered: