changes
This commit is contained in:
parent
c879b83ec0
commit
b4004807ac
18
init.lua
18
init.lua
|
@ -174,16 +174,16 @@ require('lazy').setup({
|
|||
|
||||
-- don't override the built-in and fugitive keymaps
|
||||
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
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
||||
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
||||
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
|
||||
vim.keymap.set({'n', 'v'}, '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
||||
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
@ -362,12 +362,10 @@ vim.keymap.set({ 'n', 'v' }, '<leader>a;', ":Tab /;<cr>", { silent = true })
|
|||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
|
||||
|
||||
-- [[ highlight on yank ]]
|
||||
-- see `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('yankhighlight', { clear = true })
|
||||
vim.api.nvim_create_autocmd('textyankpost', {
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue