4 files changed,
52 insertions(+),
66 deletions(-)
Author:
Smirnov Olexander
ss2316544@gmail.com
Committed at:
2022-06-16 23:54:33 +0300
Parent:
04f01e4
A
lua/configs/telescope.lua
@@ -0,0 +1,51 @@
+local telescope = require "telescope" +local actions = require "telescope.actions" + +telescope.setup { + defaults = { + prompt_prefix = " ", + selection_caret = " ", + file_ignore_patterns = { + ".git", + "node_modules", + "__pycache__", + "target", + "vendor", + ".bin", + }, + + mappings = { + i = { + ["<esc>"] = actions.close, + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + ["<C-d>"] = actions.delete_buffer, + }, + n = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + ["<C-d>"] = actions.delete_buffer, + }, + }, + }, + pickers = { + find_files = { theme = "ivy" }, + live_grep = { theme = "ivy" }, + buffers = { theme = "ivy" }, + oldfiles = { theme = "ivy" }, + keymaps = { theme = "ivy" }, + git_branches = { theme = "ivy" }, + git_commits = { theme = "ivy" }, + git_status = { theme = "ivy" }, + lsp_definitions = { theme = "ivy" }, + lsp_references = { theme = "ivy" }, + lsp_implementations = { theme = "ivy" }, + lsp_document_symbols = { theme = "ivy" }, + }, + extensions = { + ["ui-select"] = { require("telescope.themes").get_ivy {} }, + }, +} + +telescope.load_extension "projects" +telescope.load_extension "ui-select"
D
@@ -1,55 +0,0 @@
-local telescope = require "telescope" - -telescope.setup { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - layout_config = { - prompt_position = "top", - horizontal = { mirror = false }, - vertical = { mirror = false }, - }, - file_ignore_patterns = { - "node_modules", - "__pycache__", - "target", - "vendor", - ".git", - ".bin", - }, - mappings = { - i = { - ["<esc>"] = "close", - ["<C-j>"] = "move_selection_next", - ["<C-k>"] = "move_selection_previous", - ["<C-d>"] = "delete_buffer", - }, - n = { - ["<C-j>"] = "move_selection_next", - ["<C-k>"] = "move_selection_previous", - ["<C-d>"] = "delete_buffer", - }, - }, - }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_ivy {}, - }, - }, - pickers = { - find_files = { theme = "ivy" }, - live_grep = { theme = "ivy", only_sort_text = true }, - buffers = { theme = "ivy" }, - oldfiles = { theme = "ivy" }, - keymaps = { theme = "ivy" }, - git_branches = { theme = "ivy" }, - git_commits = { theme = "ivy" }, - git_status = { theme = "ivy" }, - lsp_definitions = { theme = "ivy" }, - lsp_references = { theme = "ivy" }, - lsp_implementations = { theme = "ivy" }, - lsp_document_symbols = { theme = "ivy" }, - }, -} - -telescope.load_extension "projects"
M
lua/plugins.lua
@@ -59,15 +59,8 @@ -- picker & file explorer
use { "nvim-telescope/telescope.nvim", cmd = "Telescope", - module = "telescope", config = u.get_config "configs.telescope", - requires = { - { - "nvim-telescope/telescope-ui-select.nvim", - event = "BufRead", - config = u.get_config "configs.telescope.ui-select", - }, - }, + requires = { "nvim-telescope/telescope-ui-select.nvim" }, } use {