mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-07-02 17:49:25 +00:00
[neovim] Use conform plugin for auto formatting
This commit is contained in:
@ -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(
|
||||
|
@ -114,7 +114,7 @@ require("lazy").setup({
|
||||
{ "numToStr/Comment.nvim", version = "v0.*" },
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
{ "akinsho/bufferline.nvim", event = "VeryLazy", branch = "main" }, -- version = "v4.*" },
|
||||
{ "akinsho/bufferline.nvim", event = "VeryLazy", version = "v4.*" },
|
||||
{ "moll/vim-bbye" },
|
||||
{ "nvim-lualine/lualine.nvim", event = "VeryLazy" },
|
||||
{ "lukas-reineke/indent-blankline.nvim", event = "BufReadPost", main = "ibl" },
|
||||
@ -185,6 +185,11 @@ require("lazy").setup({
|
||||
{ "folke/trouble.nvim" },
|
||||
{ "glepnir/lspsaga.nvim", event = "BufRead" },
|
||||
{ "arkav/lualine-lsp-progress" },
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
},
|
||||
|
||||
-- Telescope
|
||||
{ "nvim-telescope/telescope.nvim", cmd = "Telescope" },
|
||||
|
Reference in New Issue
Block a user