helix icon indicating copy to clipboard operation
helix copied to clipboard

global indentation configuration

Open nnym opened this issue 2 years ago • 5 comments

Indentation can be configured globally as shown below.

[editor.indent]
tab-width = 4
unit = "t"

These settings are used when a buffer is loaded and an indentation style is not detected and override language-specific defaults. However, they can be overridden per language in languages.toml by setting indent.required = true.

[[language]]
name = "yaml"
indent = {tab-width = 2, unit = "  ", required = true}

Setting indent.required = false for a language in the user's language.toml requires setting indent.{tab-width,unit} too but I think that this is out of the scope of this patch given that the same happens when setting indent.tab-width or indent.unit only. These changes should resolve #3159.

nnym avatar Apr 08 '23 05:04 nnym

Would be nice to try and merge this

Jackojc avatar Oct 29 '23 10:10 Jackojc

Would really like this, annoying to have to keep setting it every time I open helix. It would be nice if there was some helix.rc or such so this wouldn't be a problem

XavierCS-dev avatar Dec 14 '23 18:12 XavierCS-dev