initial commit
This commit is contained in:
commit
07d4f917bd
83 changed files with 3762 additions and 0 deletions
39
user/config/nvim/lua/gpskwlkr/plugins/telescope.lua
Normal file
39
user/config/nvim/lua/gpskwlkr/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
path_display = { "truncate " },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- telescope.load_extension("fzf")
|
||||
|
||||
-- set keymaps
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||
keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
keymap.set("n", "<leader>ps", function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||
end)
|
||||
keymap.set("n", "<leader>vh", builtin.help_tags, {})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue