fix: upgrade formatting setup to new syntax

main
mandlm 2022-12-20 08:47:32 +01:00
parent 0b5b7049f5
commit fa8a934a2b
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ local on_attach = function(client, bufnr)
nnoremap("K", vim.lsp.buf.hover)
nnoremap("<leader>rn", vim.lsp.buf.rename)
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", require("lsp_lines").toggle)
nnoremap("<C-p>", vim.diagnostic.goto_prev)
@ -23,7 +23,7 @@ local on_attach = function(client, bufnr)
-- disable tsserver formatting
if client.name == "tsserver" then
client.resolved_capabilities["document_formatting"] = false
client.server_capabilities.document_formatting = false
end
if client.supports_method("textDocument/formatting") then