diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 25f1a7d..6d0b286 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -48,7 +48,7 @@ local custom_attach = function(client, bufnr) -- Set some key bindings conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - map("n", "f", vim.lsp.buf.format, { desc = "format code" }) + map({"n", "x"}, "f", vim.lsp.buf.format, { desc = "format code" }) end -- Uncomment code below to enable inlay hint from language server, some LSP server supports inlay hint,