use flash.nvim instead of Hop.nvim

This commit is contained in:
2025-04-10 10:28:17 +08:00
parent 1fb721ead7
commit 560d7c724a
4 changed files with 34 additions and 60 deletions

60
lua/backplugins/hop.lua Normal file
View File

@@ -0,0 +1,60 @@
return{
{
'smoka7/hop.nvim',
version = "*",
opts = {
keys = 'etovxqpdygfblzhckisuran'
},
keys = {
{
'<leader>f',
function()
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.AFTER_CURSOR, current_line_only = true })
end,
desc = 'Hop forward',
},
{
'<leader>F',
function()
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.BEFORE_CURSOR, current_line_only = true })
end,
desc = 'Hop backward',
},
{
'<leader>t',
function()
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })
end,
desc = 'Hop forward (offset)',
},
{
'<leader>T',
function()
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })
end,
desc = 'Hop backward (offset)',
},
{
'<leader>s',
function()
require('hop').hint_char1()
end,
desc = 'Hop anywhere',
},
{
'<leader>S',
function()
require('hop').hint_char2()
end,
desc = 'Hop anywhere (2 chars)',
},
{
'<leader>sw',
function()
require('hop').hint_words()
end,
desc = 'Hop words',
},
}
}
}