aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua36
-rw-r--r--lua/telescope-setup.lua36
2 files changed, 38 insertions, 34 deletions
diff --git a/init.lua b/init.lua
index d7c519f..81db121 100644
--- a/init.lua
+++ b/init.lua
@@ -56,40 +56,8 @@ require('options')
-- Configure keymaps
require('keymaps')
--- [[ Configure Telescope ]]
--- See `:help telescope` and `:help telescope.setup()`
-require('telescope').setup {
- defaults = {
- mappings = {
- i = {
- ['<C-u>'] = false,
- ['<C-d>'] = false,
- },
- },
- },
-}
-
--- Enable telescope fzf native, if installed
-pcall(require('telescope').load_extension, 'fzf')
-
--- See `:help telescope.builtin`
-vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
-vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
-vim.keymap.set('n', '<leader>/', function()
- -- You can pass additional configuration to telescope to change theme, layout, etc.
- require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
- winblend = 10,
- previewer = false,
- })
-end, { desc = '[/] Fuzzily search in current buffer' })
-
-vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
-vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
-vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
-vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
-vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
-vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
-vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
+-- Configure Telescope (fuzzy finder)
+require('telescope-setup')
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
diff --git a/lua/telescope-setup.lua b/lua/telescope-setup.lua
new file mode 100644
index 0000000..be34051
--- /dev/null
+++ b/lua/telescope-setup.lua
@@ -0,0 +1,36 @@
+-- [[ Configure Telescope ]]
+-- See `:help telescope` and `:help telescope.setup()`
+require('telescope').setup {
+ defaults = {
+ mappings = {
+ i = {
+ ['<C-u>'] = false,
+ ['<C-d>'] = false,
+ },
+ },
+ },
+}
+
+-- Enable telescope fzf native, if installed
+pcall(require('telescope').load_extension, 'fzf')
+
+-- See `:help telescope.builtin`
+vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
+vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
+vim.keymap.set('n', '<leader>/', function()
+ -- You can pass additional configuration to telescope to change theme, layout, etc.
+ require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
+ winblend = 10,
+ previewer = false,
+ })
+end, { desc = '[/] Fuzzily search in current buffer' })
+
+vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
+vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
+vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
+vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
+vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
+vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
+vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
+
+-- vim: ts=2 sts=2 sw=2 et