diff options
author | Alan Pearce | 2023-04-23 19:28:57 +0200 |
---|---|---|
committer | Alan Pearce | 2023-04-23 21:55:29 +0200 |
commit | 3b0c32cc6c20f6a20cf5f7e48668743f71c69e44 (patch) | |
tree | c183957fb6df7062734210c5c52962457bf3fa80 /user/nvim | |
parent | 558c0d61af4eafc64c1df3ca56711530b90403c0 (diff) | |
download | nixfiles-3b0c32cc6c20f6a20cf5f7e48668743f71c69e44.tar.lz nixfiles-3b0c32cc6c20f6a20cf5f7e48668743f71c69e44.tar.zst nixfiles-3b0c32cc6c20f6a20cf5f7e48668743f71c69e44.zip |
neovim: enable fuzzy finding with telescope
Diffstat (limited to 'user/nvim')
-rw-r--r-- | user/nvim/init.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/user/nvim/init.lua b/user/nvim/init.lua index ddeb6940..d1dcb88b 100644 --- a/user/nvim/init.lua +++ b/user/nvim/init.lua @@ -183,3 +183,28 @@ keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts) keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts) -- Resume latest coc list keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts) + +local telescope = require("telescope") +telescope.setup { + defaults = { + mappings = { + i ={ + ["<C-h>"] = "which_key" + } + } + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + } + } +} +telescope.load_extension("fzf") +local ts_builtin = require('telescope.builtin') +keyset("n", "<leader>ff", ts_builtin.find_files, {}) +keyset("n", "<leader>fg", ts_builtin.live_grep, {}) +keyset("n", "<leader>bb", ts_builtin.buffers, {}) +keyset("n", "<leader>fh", ts_builtin.help_tags, {}) |