summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/module/telescope.lua
diff options
context:
space:
mode:
authorRevaz Nakhutsrishvili <r@revaz.xyz>2024-09-03 11:02:19 +0400
committerRevaz Nakhutsrishvili <r@revaz.xyz>2024-09-03 11:02:19 +0400
commit72bac3930e8442faaea834724c2ef80440c505ed (patch)
tree0910c73f912cc9f747921f408decbd73a97fecb9 /.config/nvim/lua/module/telescope.lua
parentaa8c3484100b2b7e84a7aa8c7e416dde484b25ee (diff)
add neovim config
Diffstat (limited to '.config/nvim/lua/module/telescope.lua')
-rw-r--r--.config/nvim/lua/module/telescope.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/.config/nvim/lua/module/telescope.lua b/.config/nvim/lua/module/telescope.lua
new file mode 100644
index 0000000..21869d1
--- /dev/null
+++ b/.config/nvim/lua/module/telescope.lua
@@ -0,0 +1,43 @@
+local telescope = require "telescope"
+local builtin = require "telescope.builtin"
+local actions = require "telescope.actions"
+
+telescope.load_extension "fzf"
+telescope.setup{
+ defaults = {
+ file_ignore_patterns = {
+ ".git",
+ "node_modules"
+ },
+ mappings = {
+ i = {
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ }
+ }
+ },
+ pickers = {
+ find_files = {
+ hidden = true
+ },
+ live_grep = {
+ additional_args = { "--hidden" }
+ },
+ grep_string = {
+ additional_args = { "--hidden" }
+ },
+ buffers = {
+ previewer = false,
+ mappings = {
+ i = {
+ ["<C-d>"] = actions.delete_buffer
+ }
+ }
+ },
+ }
+}
+
+vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
+vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
+vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
+vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})