From fa8a934a2b35541fb708b84c6dacbb923497eda0 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 20 Dec 2022 08:47:32 +0100 Subject: [PATCH] fix: upgrade formatting setup to new syntax --- home-manager/neovim/lspconfig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-manager/neovim/lspconfig.lua b/home-manager/neovim/lspconfig.lua index 3f690b1..ee5f769 100644 --- a/home-manager/neovim/lspconfig.lua +++ b/home-manager/neovim/lspconfig.lua @@ -15,7 +15,7 @@ local on_attach = function(client, bufnr) nnoremap("K", vim.lsp.buf.hover) nnoremap("rn", vim.lsp.buf.rename) nnoremap("ca", vim.lsp.buf.code_action) - nnoremap("f", vim.lsp.buf.formatting) + nnoremap("f", vim.lsp.buf.format) nnoremap("d", telescope.diagnostics) nnoremap("D", require("lsp_lines").toggle) nnoremap("", 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