fix: upgrade formatting setup to new syntax
parent
0b5b7049f5
commit
70c37606e1
|
@ -15,7 +15,7 @@ local on_attach = function(client, bufnr)
|
||||||
nnoremap("K", vim.lsp.buf.hover)
|
nnoremap("K", vim.lsp.buf.hover)
|
||||||
nnoremap("<leader>rn", vim.lsp.buf.rename)
|
nnoremap("<leader>rn", vim.lsp.buf.rename)
|
||||||
nnoremap("<leader>ca", vim.lsp.buf.code_action)
|
nnoremap("<leader>ca", vim.lsp.buf.code_action)
|
||||||
nnoremap("<leader>f", vim.lsp.buf.formatting)
|
nnoremap("<leader>f", vim.lsp.buf.format)
|
||||||
nnoremap("<leader>d", telescope.diagnostics)
|
nnoremap("<leader>d", telescope.diagnostics)
|
||||||
nnoremap("<leader>D", require("lsp_lines").toggle)
|
nnoremap("<leader>D", require("lsp_lines").toggle)
|
||||||
nnoremap("<C-p>", vim.diagnostic.goto_prev)
|
nnoremap("<C-p>", vim.diagnostic.goto_prev)
|
||||||
|
@ -23,7 +23,7 @@ local on_attach = function(client, bufnr)
|
||||||
|
|
||||||
-- disable tsserver formatting
|
-- disable tsserver formatting
|
||||||
if client.name == "tsserver" then
|
if client.name == "tsserver" then
|
||||||
client.resolved_capabilities["document_formatting"] = false
|
client.server_capabilities.document_formatting = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
|
Loading…
Reference in New Issue