gleam-lang / tree-sitter-gleam

🌳 A tree-sitter grammar for the Gleam programming language
Apache License 2.0
78 stars 16 forks source link

Indentation does not match the formatting one #102

Closed upsidedownsweetfood closed 1 month ago

upsidedownsweetfood commented 1 month ago

The auto-indent value seems not to be correct, as the gleam format command seems to use two spaces, while the editor defaults to four.

image

upsidedownsweetfood commented 1 month ago

So It seems like this is not something that is supported by tree-sitter, but rather it comes from the nvim-treesitter plugin.

My solution was to add a .editorconfig file with the following content:

[*]
indent_style=space
indent_size=2