pappasam / nginx-language-server

Language server for nginx.conf
GNU General Public License v3.0
60 stars 2 forks source link

[Question] Are there any plans to add a formatter feature? #9

Closed yaegassy closed 3 years ago

yaegassy commented 3 years ago

I thought it would be useful to add a formatter feature to nginx-language-server.

As you may know, there is a python tool called nginxfmt.

How about the idea of running this command from the language server?

Of course, you can use diagnostic-language-server (coc-diagnostic) to configure it, but many people may find it useful to have the features integrated in the language server itself.

pappasam commented 3 years ago

@yaegassy good question! It's not on my short-term roadmap because I personally use my own plugin for formatting files: https://github.com/pappasam/vim-filetype-formatter

I support https://github.com/vasilevich/nginxbeautifier out of the box there. Happy to consider adding a formatter though because it's definitely in-scope for the project!

pappasam commented 3 years ago

Just tried nginx-config-formatter. Nice tool, I'd be fine adding that as a dependency and supporting code formatting with this language server.

yaegassy commented 3 years ago

I just wanted to share an idea with you, so this issue is closed.

Thanks reply! 🙇