Nvim: some code prettifying
This commit is contained in:
parent
5baa4af474
commit
4046ef4e48
3 changed files with 27 additions and 28 deletions
|
@ -1,6 +1,4 @@
|
|||
local k = function(lhs, rhs, opts)
|
||||
vim.keymap.set("", lhs, rhs, opts)
|
||||
end
|
||||
local k = vim.keymap.set
|
||||
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
|
@ -20,17 +18,17 @@ return {
|
|||
local opts
|
||||
|
||||
-- Hunk navigation
|
||||
k("[h", gs.prev_hunk, { desc = "Previous hunk" })
|
||||
k("]h", gs.next_hunk, { desc = "Next hunk" })
|
||||
k("n", "[h", gs.prev_hunk, { desc = "Previous hunk" })
|
||||
k("n", "]h", gs.next_hunk, { desc = "Next hunk" })
|
||||
|
||||
-- Hunk actions
|
||||
opts = { desc = "Hunk" }
|
||||
k("<leader>grh", gs.reset_hunk, opts)
|
||||
k("<leader>gah", gs.stage_hunk, opts)
|
||||
k("n", "<leader>grh", gs.reset_hunk, opts)
|
||||
k("n", "<leader>gah", gs.stage_hunk, opts)
|
||||
|
||||
-- Buffer actions
|
||||
opts = { desc = "Buffer" }
|
||||
k("<leader>gab", gs.stage_buffer, opts)
|
||||
k("<leader>grb", gs.reset_buffer, opts)
|
||||
k("n", "<leader>gab", gs.stage_buffer, opts)
|
||||
k("n", "<leader>grb", gs.reset_buffer, opts)
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ return {
|
|||
"neovim/nvim-lspconfig",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- Add MasonUpdateAll
|
||||
{ "Zeioth/mason-extra-cmds", config = true },
|
||||
{ "Zeioth/mason-extra-cmds", opts = {} },
|
||||
-- Add lockfile support
|
||||
{
|
||||
"zapling/mason-lock.nvim",
|
||||
|
@ -18,7 +18,7 @@ return {
|
|||
-- Extended functionality for jdtls
|
||||
"mfussenegger/nvim-jdtls",
|
||||
-- Add support for LSP file operations
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
{ "antosha417/nvim-lsp-file-operations", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue