jbyuki / nabla.nvim

take your scientific notes :pencil2: in Neovim
MIT License
581 stars 17 forks source link

Added a .stylua.toml file to configure stylua #68

Closed linguini1 closed 8 months ago

linguini1 commented 8 months ago

This PR adds a .stylua.toml file to configure .lua file formatting. This way, future PRs will remain consistent in formatting and not have large diffs due to different contributor formatter settings.

I tried to pick sensible configuration options for the formatter configuration based on previous code style. For instance, one document had two space indents while the others had 4 spaces, so I opted for an indent width of 4 spaces.

This PR only adds formatting changes from stylua, and does not add any change to the code itself. I did, however, fix a small type in utils.lua where "nvim-treesitter" was spelt "nvim-tresitter" twice. That was the only non-formatting change.

max397574 commented 8 months ago

This PR only adds formatting changes from stylua, and does not add any change to the code itself. I did, however, fix a small type in utils.lua where "nvim-treesitter" was spelt "nvim-tresitter" twice. That was the only non-formatting change.

did you just change it in the *.lua file or also in the one from which it's generated? If only in the lua this will just be overwritten

linguini1 commented 8 months ago

did you just change it in the *.lua file or also in the one from which it's generated? If only in the lua this will just be overwritten

Ah, I had no idea! So formatting the .lua.t files will also transfer over to the generated lua files? I guess I shouldn't even be touching the regular lua files then?

max397574 commented 8 months ago

I don't think so the whole generated thing is why they are formatted so bad Imo it's definitely an improvement if you format the *.lua files I was talking about the typo, sorry that this wasn't clear