feat: migrated from vim-fzf to telescope
This commit is contained in:
parent
611e8c3075
commit
1b15804fea
3 changed files with 41 additions and 3 deletions
dotfiles/neovim/lua/my/plugins
|
@ -2,7 +2,8 @@ local M = {}
|
|||
|
||||
function M.setup()
|
||||
require("my.plugins.lspconfig").setup()
|
||||
require("my.plugins.fzf-lua").setup()
|
||||
-- require("my.plugins.fzf-lua").setup()
|
||||
require("my.plugins.telescope").setup()
|
||||
require("my.plugins.treesitter").setup()
|
||||
require("my.plugins.comment").setup()
|
||||
|
||||
|
|
35
dotfiles/neovim/lua/my/plugins/telescope.lua
Normal file
35
dotfiles/neovim/lua/my/plugins/telescope.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local mapSilent = require("my.keymaps").mapSilent
|
||||
|
||||
local M = {}
|
||||
|
||||
local bindings = {
|
||||
-- Open files with control + P
|
||||
find_files = "<c-P>",
|
||||
|
||||
-- Search through files with control + F
|
||||
live_grep = "<c-F>",
|
||||
|
||||
-- See diagnostics with space + d
|
||||
diagnotics = "<space>d",
|
||||
|
||||
-- Open a list with all the pickers
|
||||
builtin = "<space>t",
|
||||
|
||||
-- List function, var names etc
|
||||
treesitter = "<space>s",
|
||||
|
||||
-- Git stuff
|
||||
git_commits = "<space>gj",
|
||||
git_branches = "<space>gk"
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
for action, keybind in pairs(bindings) do
|
||||
-- Maps the keybind to the action
|
||||
mapSilent('n', keybind, "<cmd>lua require('telescope.builtint')." .. action .. "()<CR>")
|
||||
end
|
||||
|
||||
require("telescope").setup {defaults = {mappings = {i = {["<C-h>"] = "which-key"}}}}
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue