1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Enable LSP format also for visual selection

This commit is contained in:
jdhao 2024-11-05 22:03:46 +01:00
parent 94cade03be
commit 97f72936ac

View File

@ -48,7 +48,7 @@ local custom_attach = function(client, bufnr)
-- Set some key bindings conditional on server capabilities -- Set some key bindings conditional on server capabilities
if client.server_capabilities.documentFormattingProvider then if client.server_capabilities.documentFormattingProvider then
map("n", "<space>f", vim.lsp.buf.format, { desc = "format code" }) map({"n", "x"}, "<space>f", vim.lsp.buf.format, { desc = "format code" })
end end
-- Uncomment code below to enable inlay hint from language server, some LSP server supports inlay hint, -- Uncomment code below to enable inlay hint from language server, some LSP server supports inlay hint,