feat: hop ocnfigs

This commit is contained in:
ralvescosta 2025-03-16 19:55:53 -03:00
parent 48a21c4532
commit 58e8cddefc
1 changed files with 20 additions and 1 deletions

View File

@ -3,7 +3,26 @@ return {
'phaazon/hop.nvim', 'phaazon/hop.nvim',
branch = 'v2', branch = 'v2',
config = function() config = function()
require('hop').setup() local hop = require 'hop'
hop.setup()
local directions = require('hop.hint').HintDirection
vim.keymap.set('', 'f', function()
hop.hint_char1 { direction = directions.AFTER_CURSOR, current_line_only = true }
end, { remap = true })
vim.keymap.set('', 'F', function()
hop.hint_char1 { direction = directions.BEFORE_CURSOR, current_line_only = true }
end, { remap = true })
vim.keymap.set('', 't', function()
hop.hint_char1 { direction = directions.AFTER_CURSOR, current_line_only = true, hint_offset = -1 }
end, { remap = true })
vim.keymap.set('', 'T', function()
hop.hint_char1 { direction = directions.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 }
end, { remap = true })
end, end,
}, },
} }