nvimtools / none-ls.nvim

null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
The Unlicense
2.39k stars 69 forks source link

feat: add opentofu-fmt formatter #136

Closed pimvh closed 3 months ago

pimvh commented 3 months ago

Hi! I have been an avid user of null-ls before, and switched to none-ls.nvim. Thanks for keeping this project alive 👍

This adds the opentofu-fmt formatter, in addition to terraform. It is mutually exclusive with the terraform one, as both are use to format the terraform filetypes.

Most of the code is duplicate from the terraform one, but I don't think there is a simpler/more straightforward way to include opentofu in the codebase. If there is, feel free to point me in the right direction.

Opentofu is a fork which maintains the open source Apache 2.0 license of Terraform, after it switched to the non opensource BSL. See its manifesto.

Not sure if relevant, but I would be happy to maintain this formatter.

pimvh commented 3 months ago

I am certain I have to run something else to generate relevant new documentation, but can't find it in the contributing docs, can you point me in the right direction?

mochaaP commented 3 months ago

I am certain I have to run something else to generate relevant new documentation, but can't find it in the contributing docs, can you point me in the right direction?

This is done with CI on master branch, no worries :)

Thanks for the contribution!