Closed FedeAbella closed 1 month ago
Of course, we could also use any other formatter. I think having a common format is more important than which formatter to use.
@FedeAbella definitely, this is a very good proposal! I do prefer 2 space indentation in most languages including apex
, javascript
, and Rust
.
Just had a look at stylua, it seems straight forward and easy to use.
Feel free to craft the .stylua.toml
and make a PR. ❤
StyLua is one of the most common lua formatters I've seen around, and one commonly found in nvim lsp configs.
I propose we adopt stylua formatting guidelines within the project, so we can have uniform indentation, quotation, etc across the entire project. This makes it easier for new collaborators to jump in, especially if they already have stylua in their nvim config.
The change should be simple enough, by adding a
.stylua.toml
file in the root of the project with our desired defaults, then letting nvim format the files appropriately. I've noticed you prefer using 2 space indentation @xixiaofinland, and I think we can safely leave that by usingin the
.stylua.toml
file. We can also discuss what other defaults to use.If this is fine by you, I can take on this and propose a reformatting soon.