Skip to content
Discussion options

You must be logged in to vote

I figured it out! The project had an .editorconfig file which I wasn't aware of:

# editorconfig.org
root = true

[*]
indent_style = space
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,yml,eslintrc,md,config}]
indent_style = space
indent_size = 2

[*.{md}]
trim_trailing_whitespace = false⏎

As you can see, it defines indent_style but not indent_size. Reading helix-core/src/editor_config.rs (forgive me, I'm not a Rust programmer) it seems that the logic is:

  1. If indent_size is number then use that
  2. If indent_size is tab (?) then use tab_width
  3. Otherwise, default to 4.

I'm not sure why Helix defaults to 4 instead of languag…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@A-kly
Comment options

@A-kly
Comment options

Answer selected by valueof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants