feat(cfg): add lsp-format.nvim

https://github.com/lukas-reineke/lsp-format.nvim
This commit is contained in:
EGRrqq 2023-09-20 10:38:24 -05:00
parent 2e4ccafb32
commit 03c4e3a719
2 changed files with 15 additions and 12 deletions

View File

@ -128,16 +128,16 @@ require('lazy').setup({
-- don't override the built-in and fugitive keymaps -- don't override the built-in and fugitive keymaps
local gs = package.loaded.gitsigns local gs = package.loaded.gitsigns
vim.keymap.set({'n', 'v'}, ']c', function() vim.keymap.set({ 'n', 'v' }, ']c', function()
if vim.wo.diff then return ']c' end if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end) vim.schedule(function() gs.next_hunk() end)
return '<Ignore>' return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"}) end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
vim.keymap.set({'n', 'v'}, '[c', function() vim.keymap.set({ 'n', 'v' }, '[c', function()
if vim.wo.diff then return '[c' end if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end) vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>' return '<Ignore>'
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"}) end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
end, end,
}, },
}, },
@ -555,9 +555,9 @@ vim.opt.relativenumber = true
vim.opt.guicursor = "" vim.opt.guicursor = ""
-- 4 tab indenting -- 4 tab indenting
vim.opt.tabstop = 4 vim.opt.tabstop = 2
vim.opt.softtabstop = 4 vim.opt.softtabstop = 2
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 2
vim.opt.expandtab = true vim.opt.expandtab = true
-- move line up/down -- move line up/down

View File

@ -8,4 +8,7 @@ return {
--"surroundings": parentheses, brackets, quotes, XML tags, and more --"surroundings": parentheses, brackets, quotes, XML tags, and more
'tpope/vim-surround', 'tpope/vim-surround',
--wrapper around Neovims native LSP formatting
"lukas-reineke/lsp-format.nvim",
} }