feat: disable conflicting auto-formatters
This commit is contained in:
parent
b5489face8
commit
b20b0afb88
@ -80,6 +80,11 @@ local function custom_on_attach(client, buffer_nr)
|
||||
-- Open all project diagnostics in quickfix list
|
||||
bufnnoremap("<leader><C-d>", "<Cmd>lua vim.diagnostic.setqflist()<CR>")
|
||||
|
||||
-- disable conflicting formatters
|
||||
if client.name == "tsserver" or client.name == "html" then
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()")
|
||||
end
|
||||
|
Reference in New Issue
Block a user