2
This commit is contained in:
dlsaldanas 2025-09-25 12:40:02 -03:00
parent 78e145660a
commit 1569339c0e
3 changed files with 70 additions and 54 deletions

View File

@ -41,4 +41,5 @@ vim.o.expandtab = true
local set = vim.opt_local
set.shiftwidth = 2
vim.o.shiftwidth = 2
vim.keymap.set('n', '<leader>yb', '<cmd>let @+ = expand("%")<CR>', { desc = 'yank to plus register current relative path' })
return {}

View File

@ -12,9 +12,7 @@ vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = tr
-- 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,
callback = function() vim.highlight.on_yank() end,
group = highlight_group,
pattern = '*',
})

View File

@ -1,15 +1,30 @@
-- Adds git related signs to the gutter, as well as utilities for managing changes
-- NOTE: gitsigns is already included in init.lua but contains only the base
-- config. This will add also the recommended keymaps.
---@module 'lazy'
---@type LazySpec
-- Alternatively, use `config = function() ... end` for full control over the configuration.
-- If you prefer to call `setup` explicitly, use:
-- {
-- 'lewis6991/gitsigns.nvim',
-- config = function()
-- require('gitsigns').setup({
-- -- Your gitsigns configuration here
-- })
-- end,
-- }
--
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`.
--
-- See `:help gitsigns` to understand what the configuration keys do
return {
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
---@module 'gitsigns'
---@type Gitsigns.Config
---@diagnostic disable-next-line: missing-fields
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
current_line_blame = true,
on_attach = function(bufnr)
local gitsigns = require 'gitsigns'
@ -55,4 +70,6 @@ return {
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
end,
},
},
}
-- vim: ts=2 sts=2 sw=2 et