ray-x / nvim

Personal neovim setup with 180+ plugins.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoiding LSP formatting conflicts

eremid opened this issue · comments

Hello,

How can I force a lsp server on file save ? For example, formating by default with null-ls on my go files.
I tried to add this lines but without success :
https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Avoiding-LSP-formatting-conflicts

save

Thanks for help !
Regards

commented

gopls format capacity should be disabled.
e.g in go.nvim, you can set lsp_document_formatting = false

In navigator, you can also disable with

      disable_format_cap = { "gopls"  }

Thanks.
It's not already there ?

disable_format_cap = { "sqls", "gopls", "jsonls" }, -- a list of lsp not enable auto-format (e.g. if you using efm or vim-codeformat etc)

lsp_document_formatting = false,

commented

There is a bugfix submitted for navigator. Could you check if it works?

It's ok now ! Thanks a lot.