Conversation
|
This is fine, but I ask two things:
If those two check out I'm happy to merge. Thanks for the PR! |
Stylua uses 1 tab per indent level by default. This may be rendered as 8 spaces on your neovim setup if you have kept the I prefer tabs for this reason, as the amount of whitespace in which the tab is rendered is an editor-specific setting. I personally keep ts=4 as this is enough for me to see the block separation easier. However, I am fine using any number of spaces, if that is what you would prefer. I've added a configuration file, Please let me know if there's any other modifications to stylua.toml that you would like (column width, quote-style, etc.)! ^_^ |
|
Ok almost there - can you also add a rule into the existing CI workflow, similar to the luacheck rule |
|
wrt:
I believe this test is failing due to a race condition. I ran this locally multiple times and only received the error occasionally. Based on the implementation in cmd.lua, I think that done is being set to true before the on_read function completes. This could be avoided with the following change: I could make a commit in this pr, unless a follow-up would be better? |
Calling `make fmt` will run stylua against the code in the lua directory.
Oh snap I didn't know there was an actual failure in the test suite - don't feel obligated to fix that if it's unrelated to this. Honestly that whole module should die - there are probably neovim primitives now that do that just fine. For the CI, stylelua needs to be installed before it'll pass |
Hm, I thought adding that clause to the pre-commit config would've done it... Edit: nvm I misunderstood this mechanism. |
|
Awesome, merged. Thank you! Any interest in doing the same for my other plugin, Treewalker.nvim? |
I never heard of this plugin before but I'm immediately finding it to be super useful! Especially for large yamls. I'd be happy to contribute to it. |
It would improve the readability of the code if there were consistent formatting across all lua files. StyLua was used to meet this need.