diff --git a/.config/nvim/lua/user/lsp/handlers.lua b/.config/nvim/lua/user/lsp/handlers.lua index baaa7fa..e88b348 100644 --- a/.config/nvim/lua/user/lsp/handlers.lua +++ b/.config/nvim/lua/user/lsp/handlers.lua @@ -60,7 +60,7 @@ local function lsp_keymaps(bufnr) keymap(bufnr, "n", "gI", "lua vim.lsp.buf.implementation()", opts) keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) keymap(bufnr, "n", "gl", "lua vim.diagnostic.open_float()", opts) - keymap(bufnr, "n", "lf", "lua vim.lsp.buf.formatting()", opts) + keymap(bufnr, "n", "lf", "lua vim.lsp.buf.format{ async=true }", opts) -- keymap(bufnr, "n", "li", "LspInfo", opts) -- keymap(bufnr, "n", "lI", "LspInstallInfo", opts) keymap(bufnr, "n", "la", "lua vim.lsp.buf.code_action()", opts) @@ -73,11 +73,11 @@ end M.on_attach = function(client, bufnr) if client.name == "tsserver" then - client.resolved_capabilities.document_formatting = false + client.server_capabilities.document_formatting = false end if client.name == "sumneko_lua" then - client.resolved_capabilities.document_formatting = false + client.server_capabilities.document_formatting = false end lsp_keymaps(bufnr) diff --git a/.config/nvim/lua/user/options.lua b/.config/nvim/lua/user/options.lua index 3d62a99..6c1ab77 100644 --- a/.config/nvim/lua/user/options.lua +++ b/.config/nvim/lua/user/options.lua @@ -42,4 +42,4 @@ vim.opt.fillchars.eob = " " vim.opt.shortmess:append("c") vim.opt.whichwrap:append("<,>,[,],h,l") vim.opt.iskeyword:append("-") -vim.opt.cmdheight=0 -- experimental +vim.opt.cmdheight = 0 -- experimental