mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 17:28:01 +00:00
[neovim] Add new key maps
This commit is contained in:
parent
fde23b9939
commit
1ebdd0846c
@ -13,27 +13,10 @@ if not dap_install_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
dap_install.setup({})
|
||||
|
||||
dap_install.config("python", {})
|
||||
-- add other configs here
|
||||
|
||||
dapui.setup({})
|
||||
-- deprecated
|
||||
-- sidebar = {
|
||||
-- elements = {
|
||||
-- {
|
||||
-- id = "scopes",
|
||||
-- size = 0.25, -- Can be float or integer > 1
|
||||
-- },
|
||||
-- { id = "breakpoints", size = 0.25 },
|
||||
-- },
|
||||
-- size = 40,
|
||||
-- position = "right", -- Can be "left", "right", "top", "bottom"
|
||||
-- },
|
||||
-- tray = {
|
||||
-- elements = {},
|
||||
-- },
|
||||
-- dapui.setup({})
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
|
||||
|
@ -11,4 +11,17 @@ gitsigns.setup({
|
||||
topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||
changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
|
||||
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
|
||||
map("n", "<leader>hR", gs.reset_buffer)
|
||||
end,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user