fix(null-ls): stop null-ls prompt for multiple formaters

add `client.resolved_capabilities.{document_formatting,document_range_formatting}` to on_attach of lspconfig in order to eliminate null-ls prompt for 2 formaters. Not tested with more formaters like in python, I'd say that then it'll prompt still

Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
This commit is contained in:
Daniel Boll 2022-03-07 10:12:32 -03:00 committed by siduck
parent e1cdf92a01
commit ef6ecab861

View file

@ -1,10 +1,12 @@
require("plugins.configs.others").lsp_handlers()
local function on_attach(_, bufnr)
local function on_attach(client, bufnr)
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
-- Enable completion triggered by <c-x><c-o>
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")