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:
parent
94cade03be
commit
97f72936ac
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user