summaryrefslogtreecommitdiffstats
path: root/after/plugin/telescope.lua
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-04-30 18:41:13 -0400
committerSquibid <me@zacharyscheiman.com>2023-04-30 18:41:13 -0400
commit01a09f243ce07d367c539d69d4a7f4541ab1dcd7 (patch)
treeec2af23e59a38d4f9ac476e69abc07c8110b52a1 /after/plugin/telescope.lua
parent7c5d3eff786bef884022cc813448bb085ba4eccd (diff)
downloadnvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.tar.gz
nvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.tar.bz2
nvim-01a09f243ce07d367c539d69d4a7f4541ab1dcd7.zip
new config old version is now on v1 branch
Diffstat (limited to 'after/plugin/telescope.lua')
-rw-r--r--after/plugin/telescope.lua49
1 files changed, 49 insertions, 0 deletions
diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua
new file mode 100644
index 0000000..0674b21
--- /dev/null
+++ b/after/plugin/telescope.lua
@@ -0,0 +1,49 @@
+local status_ok, telescope = pcall(require, "telescope")
+if not status_ok then
+ return
+end
+local actions = require('telescope.actions')
+
+telescope.setup {
+ defaults = {
+ borderchars = {
+ prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
+ results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
+ preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
+ },
+ sorting_strategy = 'ascending',
+ layout_strategy = 'bottom_pane',
+ layout_config = {
+ height = 0.3,
+ },
+ mappings = {
+ i = {
+ ['<C-h>'] = 'which_key',
+ ['<C-j>'] = actions.move_selection_next,
+ ['<C-k>'] = actions.move_selection_previous,
+ ['<C-l>'] = actions.select_default,
+ ['<C-u>'] = actions.preview_scrolling_up,
+ ['<C-d>'] = actions.preview_scrolling_down,
+ },
+ n = {
+ ["gg"] = actions.move_to_top,
+ ["G"] = actions.move_to_bottom,
+ },
+ },
+ extensions = {
+ ["ui-select"] = {
+ require("telescope.themes").get_ivy {
+ -- even more opts
+ }
+ }
+ },
+ }
+}
+telescope.load_extension('file_browser')
+telescope.load_extension('ui-select')
+telescope.load_extension('projects')
+
+a.nvim_create_autocmd('User', {
+ pattern = 'TelescopePreviewerLoaded',
+ command = 'setlocal number',
+})