mirror of
https://github.com/cap153/nvim.git
synced 2026-01-07 19:57:28 +08:00
添加fzf-lua配置
This commit is contained in:
parent
6d2c60eedc
commit
557287033b
8 changed files with 78 additions and 50 deletions
25
lua/lazy/plugins/fzf.lua
Normal file
25
lua/lazy/plugins/fzf.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
"ibhagwan/fzf-lua",
|
||||
-- optional for icon support
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
-- ctrl+t打开文件查找
|
||||
vim.keymap.set('n', '<c-t>', '<cmd>FzfLua files<cr>', {})
|
||||
-- ctrl+f打开字符串查找
|
||||
vim.keymap.set('n', '<c-f>', '<cmd>FzfLua grep<cr>', {})
|
||||
require("fzf-lua").setup({
|
||||
fzf_bin = "sk",
|
||||
keymap = {
|
||||
fzf = {
|
||||
-- fzf '--bind=' options
|
||||
-- true, -- uncomment to inherit all the below in your custom config
|
||||
["ctrl-e"] = "down",
|
||||
["ctrl-u"] = "up",
|
||||
-- Only valid with fzf previewers (bat/cat/git/etc)
|
||||
-- ["shift-down"] = "preview-page-down",
|
||||
-- ["shift-up"] = "preview-page-up",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue