[nvim] feat: add telescope-file-browser extension
properly setup Telescope in telescope.lua provide a new keybinding
This commit is contained in:
parent
3c7f8a29a7
commit
a9cb5afdca
@ -20,6 +20,8 @@ vim.keymap.set("n", "<leader>u", function() require("packer").sync() end)
|
||||
-- telescope
|
||||
vim.keymap.set("n", "<leader>tf",
|
||||
function() require("telescope.builtin").find_files() end)
|
||||
vim.keymap.set("n", "<leader>tef",
|
||||
function() require("telescope").extensions.file_browser.file_browser() end)
|
||||
vim.keymap.set("n", "<leader>tb",
|
||||
function() require("telescope.builtin").buffers() end)
|
||||
vim.keymap.set("n", "<leader>tg",
|
||||
|
@ -65,9 +65,14 @@ return require("packer").startup(function()
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make"
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
require("telescope")
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("file_browser")
|
||||
end
|
||||
}
|
||||
|
||||
|
22
.config/nvim/lua/plugin/telescope.lua
Normal file
22
.config/nvim/lua/plugin/telescope.lua
Normal file
@ -0,0 +1,22 @@
|
||||
-- Author : swytch
|
||||
-- Created : Monday Dec. 26, 2022 18:39:16 CET
|
||||
-- License : GPLv3
|
||||
-- Description : treesitter config file
|
||||
|
||||
require("telescope").setup {
|
||||
extensions = {
|
||||
file_browser = {
|
||||
theme = "ivy",
|
||||
-- disables netrw and use telescope-file-browser in its place
|
||||
hijack_netrw = true,
|
||||
mappings = {
|
||||
["i"] = {
|
||||
-- your custom insert mode mappings
|
||||
},
|
||||
["n"] = {
|
||||
-- your custom normal mode mappings
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user