fix: upgrade formatting setup to new syntax
This commit is contained in:
parent
0b5b7049f5
commit
fa8a934a2b
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue