I currently have an incredibly long ~/.config/helix/languages.toml, to which I append a copy of this for every language I use or encounter:
[[language]]
name = "..."
indent = { tab-width = 4, unit = "\t" }
auto-pairs = false
I discovered while writing this that I don't actually have to set auto-pairs = false in each language anymore (I don't think the global one existed/worked when I started using Helix?), so that's neat, thanks!
I would like to be able to do the same for indent. The desired behavior is that I can say "always indent with tabs, for any file type", and spaces are only used if I open an existing file that is already indented with spaces.
Potential issue with this: Some languages (e.g. makefiles) require a particular type of indentation as part of their syntax. These languages should probably have some sort of "no, really, use this even if the user said something else" flag in their indent configuration, to avoid emitting broken makefiles when the user has set space-indentation globally. Alternatively, the language-level indent could be split into indent and default-indent, where the order of precedence is language.indent > global.indent > language.default-indent.
I currently have an incredibly long
~/.config/helix/languages.toml, to which I append a copy of this for every language I use or encounter:I discovered while writing this that I don't actually have to set
auto-pairs = falsein each language anymore (I don't think the global one existed/worked when I started using Helix?), so that's neat, thanks!I would like to be able to do the same for
indent. The desired behavior is that I can say "always indent with tabs, for any file type", and spaces are only used if I open an existing file that is already indented with spaces.Potential issue with this: Some languages (e.g. makefiles) require a particular type of indentation as part of their syntax. These languages should probably have some sort of "no, really, use this even if the user said something else" flag in their
indentconfiguration, to avoid emitting broken makefiles when the user has set space-indentation globally. Alternatively, the language-levelindentcould be split intoindentanddefault-indent, where the order of precedence islanguage.indent > global.indent > language.default-indent.