feat(nvim): rice telescope
This commit is contained in:
		| @@ -1,27 +1,59 @@ | ||||
| return { | ||||
|     'nvim-telescope/telescope.nvim', branch = '0.1.x', | ||||
|     dependencies = { 'nvim-lua/plenary.nvim' }, | ||||
|     opts = { | ||||
|       defaults = { | ||||
|         file_ignore_patterns = { "**/*.pdf" }, | ||||
|         layout_strategy = "horizontal", | ||||
|         layout_config = { prompt_position = "top" }, | ||||
|         sorting_strategy = "ascending", | ||||
|         winblend = 0, | ||||
|       }, | ||||
|     }, | ||||
|     keys = { | ||||
|         {"<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files"}, | ||||
|         {"<leader>fe", "<cmd>Telescope git_files<cr>", desc = "Find file respecting .gitignore"}, | ||||
|         {"<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep file in file"}, | ||||
|         {"<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Search through buffers"}, | ||||
|         {"<leader>ft", "<cmd>Telescope tags<cr>", desc = "Search through tags"}, | ||||
|         {"<leader>fm", "<cmd>Telescope marks<cr>", desc = "Search through marks"}, | ||||
|         {"<leader>fs", "<cmd>Telescope search_history<cr>", desc = "Search through search"}, | ||||
|     }, | ||||
|     config = function() | ||||
|         require('telescope').setup( | ||||
|  | ||||
|         ) | ||||
|     end | ||||
| 	"nvim-telescope/telescope.nvim", | ||||
| 	branch = "0.1.x", | ||||
| 	dependencies = { "nvim-lua/plenary.nvim" }, | ||||
| 	opts = { | ||||
| 		defaults = { | ||||
| 			file_ignore_patterns = { "**/*.pdf" }, | ||||
| 			layout_strategy = "horizontal", | ||||
| 			layout_config = { | ||||
| 				horizontal = { | ||||
| 					prompt_position = "top", | ||||
| 					preview_width = 0.55, | ||||
| 				}, | ||||
| 				width = 0.87, | ||||
| 				height = 0.80, | ||||
| 				preview_cutoff = 120, | ||||
| 			}, | ||||
| 		sorting_strategy = "ascending", | ||||
| 		borderchars = { "█", "█", "█", "█", "█", "█", "█", "█" }, | ||||
| 		prompt_prefix = "  🔍 ", | ||||
| 		selection_caret = " ➜ ", | ||||
| 		entry_prefix = "   ", | ||||
| 		winblend = 0, | ||||
| 		results_title = "", | ||||
| 		prompt_title = "", | ||||
| 		preview_title = "", | ||||
| 		mappings = { | ||||
| 			i = { | ||||
| 				["<C-d>"] = require("telescope.actions").delete_buffer, | ||||
| 			}, | ||||
| 			n = { | ||||
| 				["<C-d>"] = require("telescope.actions").delete_buffer, | ||||
| 			}, | ||||
| 		}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	config = function(_, opts) | ||||
| 		require("telescope").setup(opts) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePromptNormal", { bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopeResultsNormal", { bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePreviewNormal", { bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePromptBorder", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePromptTitle", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopeResultsTitle", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 		vim.api.nvim_set_hl(0, "TelescopePreviewTitle", { fg = "#3c3836", bg = "#3c3836" }) | ||||
| 	end, | ||||
| 	keys = { | ||||
| 		{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" }, | ||||
| 		{ "<leader>fe", "<cmd>Telescope git_files<cr>", desc = "Find file respecting .gitignore" }, | ||||
| 		{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep file in file" }, | ||||
| 		{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Search through buffers" }, | ||||
| 		{ "<leader>ft", "<cmd>Telescope tags<cr>", desc = "Search through tags" }, | ||||
| 		{ "<leader>fm", "<cmd>Telescope marks<cr>", desc = "Search through marks" }, | ||||
| 		{ "<leader>fs", "<cmd>Telescope search_history<cr>", desc = "Search through search" }, | ||||
| 	}, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user