vim-codefmt icon indicating copy to clipboard operation
vim-codefmt copied to clipboard

add lua formatter

Open lamchau opened this issue 1 year ago • 1 comments

This PR adds stylua as an alternative formatter for Lua.

  • [x] adds Stylua to README, corrects missing )
  • [x] find/replace formatterfiveone with stylua
  • [ ] vroom has been archived and was unable to get it to build on an M3 MBP but took inspiration from black.vroom, should work? I could use some help testing this

Partially addresses #180.

lamchau avatar Jul 08 '24 09:07 lamchau

I could use some help testing this

Here ya go: https://github.com/dbarnett/vim-codefmt/commit/4384b264f6ac17856ee723fb6fcd11b8b8769099

I'd also suggest you make --stdin-filepath conditional and pass the short name instead of full path, like I did for another formatter here: https://github.com/google/vim-codefmt/blob/e0e113ecfed37309af32b11df8af6fbc17463e0d/autoload/codefmt/ruff.vim#L23-L25. Pretty sure formatters don't need or want the full absolute path.

And vroom is unarchived now FWIW.

dbarnett avatar Aug 25 '24 07:08 dbarnett