1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-07-03 09:59:25 +00:00

[neovim] Use conform plugin for auto formatting

This commit is contained in:
2024-06-08 15:09:31 +02:00
parent db10008f9b
commit 29a97b4aa3
9 changed files with 45 additions and 37 deletions

View File

@ -125,12 +125,9 @@ keymap(
"<cmd>Lspsaga peek_definition<cr>",
vim.tbl_extend("force", opts, { desc = "Peek the definition of the directive under the cursor" })
)
keymap(
{ "n", "v" },
"<leader>lf",
"<cmd>lua vim.lsp.buf.format{ async=true }<cr>",
vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" })
)
keymap({ "n", "v" }, "<leader>lf", function()
require("conform").format({ async = true, lsp_fallback = true })
end, vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" }))
-- Neotest
keymap(