small fix

This commit is contained in:
dedal.qq 2025-01-06 20:05:27 +03:00
parent 8e6b274df1
commit b0da6bf2fb
2 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,7 @@ map("v", "<C-c>", '"+y', { desc = "Copy selected" })
map({ "i", "n" }, "<C-v>", '<ESC>"+p', { desc = "Past" })
map({ "n", "v", "i" }, "<C-s>", "<Cmd>w<CR>", { desc = "Save file" })
map({ "n", "v", "i" }, "<C-a>", "<ESC>ggVG", { desc = "Select all" })
map("n", "<C-S-left>", "<C-w>h", { desc = "switch window left" })
map("n", "<C-S-right>", "<C-w>l", { desc = "switch window right" })
@ -41,7 +42,7 @@ map("n", "<leader>t", function()
end, { desc = "Open terminal" })
-- searchbox
map({ "n", "v", "i" }, "<C-f>", "<Cmd>SearchBoxIncSearch<CR>", { desc = "Search in file" })
map({ "n", "v", "i" }, "<C-f>", "<Cmd>SearchBoxMatchAll<CR>", { desc = "Search in file" })
-- menu
local menu = require("menu")

View File

@ -10,6 +10,16 @@ return {
winhighlight = "Normal:Normal,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None",
},
},
hooks = {
after_mount = function(input)
local opts = { buffer = input.bufnr }
vim.keymap.set("i", "<Up>", "<Plug>(searchbox-prev-match)", opts)
vim.keymap.set("i", "<Down>", "<Plug>(searchbox-next-match)", opts)
vim.keymap.set("i", "<S-CR>", "<Plug>(searchbox-prev-match)", opts)
vim.keymap.set("i", "<CR>", "<Plug>(searchbox-next-match)", opts)
end,
},
})
end,
}