nvim hop -> flash
This commit is contained in:
+18
-49
@@ -919,56 +919,26 @@ local function makespec_mason()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function makespec_hop()
|
local function makespec_flash()
|
||||||
local function hopf()
|
|
||||||
require("hop").hint_char1({
|
|
||||||
direction = require("hop.hint").HintDirection.AFTER_CURSOR,
|
|
||||||
current_line_only = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local function hopF()
|
|
||||||
require("hop").hint_char1({
|
|
||||||
direction = require("hop.hint").HintDirection.BEFORE_CURSOR,
|
|
||||||
current_line_only = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local function hopt()
|
|
||||||
require("hop").hint_char1({
|
|
||||||
direction = require("hop.hint").HintDirection.AFTER_CURSOR,
|
|
||||||
current_line_only = true,
|
|
||||||
hint_offset = -1,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local function hopT()
|
|
||||||
require("hop").hint_char1({
|
|
||||||
direction = require("hop.hint").HintDirection.BEFORE_CURSOR,
|
|
||||||
current_line_only = true,
|
|
||||||
hint_offset = 1,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
return {
|
return {
|
||||||
"smoka7/hop.nvim",
|
"folke/flash.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
cmd = {
|
|
||||||
"HopWord",
|
|
||||||
"HopCamelCase",
|
|
||||||
"HopChar1",
|
|
||||||
"HopChar2",
|
|
||||||
"HopPattern",
|
|
||||||
"HopLine",
|
|
||||||
"HopLineStart",
|
|
||||||
"HopAnywhere",
|
|
||||||
"HopNodes",
|
|
||||||
"HopPaste",
|
|
||||||
"HopYankChar1",
|
|
||||||
},
|
|
||||||
keys = {
|
keys = {
|
||||||
{ "<CR>", "<cmd>HopWord<cr>", mode = { "n", "v" }, silent = true, noremap = true },
|
{ "<cr>", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
{ "<M-CR>", "<cmd>HopAnywhere<cr>", mode = { "n", "v" }, silent = true, noremap = true },
|
{
|
||||||
{ "f", hopf, mode = { "n", "v", "o" }, remap = true },
|
"<M-cr>",
|
||||||
{ "F", hopF, mode = { "n", "v", "o" }, remap = true },
|
mode = { "n", "o", "x" },
|
||||||
{ "t", hopt, mode = { "n", "v", "o" }, remap = true },
|
function() require("flash").treesitter() end,
|
||||||
{ "T", hopT, mode = { "n", "v", "o" }, remap = true },
|
desc = "Flash Treesitter",
|
||||||
|
},
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{
|
||||||
|
"R",
|
||||||
|
mode = { "o", "x" },
|
||||||
|
function() require("flash").treesitter_search() end,
|
||||||
|
desc = "Treesitter Search",
|
||||||
|
},
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -1113,7 +1083,6 @@ end
|
|||||||
local function makespec_noice()
|
local function makespec_noice()
|
||||||
return {
|
return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = { "MunifTanjim/nui.nvim" },
|
dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
opts = {
|
opts = {
|
||||||
cmdline = { enabled = true, view = "cmdline_popup" },
|
cmdline = { enabled = true, view = "cmdline_popup" },
|
||||||
@@ -1157,7 +1126,7 @@ end
|
|||||||
|
|
||||||
local lazyspecs = {}
|
local lazyspecs = {}
|
||||||
for _, spec in ipairs({
|
for _, spec in ipairs({
|
||||||
makespec_hop(),
|
makespec_flash(),
|
||||||
makespec_lualine(),
|
makespec_lualine(),
|
||||||
makespec_autoformat(),
|
makespec_autoformat(),
|
||||||
makespec_noice(),
|
makespec_noice(),
|
||||||
|
|||||||
Reference in New Issue
Block a user