From 1a6896868471a1227ca59f0713d7037560ecfd26 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Wed, 8 Feb 2023 03:16:53 +0000 Subject: [PATCH] feat(nvim): mess around with Telescope & Catppuccin --- dot_config/nvim/lua/plugins/catppuccin.lua | 1 + dot_config/nvim/lua/plugins/telescope.lua | 28 +++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dot_config/nvim/lua/plugins/catppuccin.lua b/dot_config/nvim/lua/plugins/catppuccin.lua index aedf6ff..e97d84b 100644 --- a/dot_config/nvim/lua/plugins/catppuccin.lua +++ b/dot_config/nvim/lua/plugins/catppuccin.lua @@ -41,6 +41,7 @@ return { }, custom_highlights = { ErrorMsg = { fg = cp.red, style = { "bold" } }, + ["@function.builtin"] = { fg = cp.blue }, LspInfoBorder = { link = "FloatBorder" }, PmenuSel = { bg = cp.surface0 }, FloatBorder = { fg = cp.overlay0, bg = "NONE" }, diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua index e02d363..8a4a541 100644 --- a/dot_config/nvim/lua/plugins/telescope.lua +++ b/dot_config/nvim/lua/plugins/telescope.lua @@ -6,13 +6,35 @@ return { require("telescope").load_extension("fzy_native") require("telescope").load_extension("catppuccin") require("telescope").load_extension("smart_open") + + local actions = require("telescope.actions") + require("telescope").setup({ + defaults = { + mappings = { + i = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + }, + n = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + }, + }, + }, + }) end, keys = { - { "ff", "Telescope smart_open", "Find files" }, + { "ff", "Telescope smart_open", "Find Files" }, { "fp", "Telescope projects", "All Projects" }, { "fr", "Telescope oldfiles", "Recent Files" }, - { "fg", "Telescope live_grep", "Live grep" }, - { "fc", "Telescope catppuccin", "Catppuccin Colours" }, + { "fg", "Telescope live_grep", "Find Text" }, + { "fh", "Telescope highlights", "Find Highlights" }, + { "fc", "Telescope current_buffer_fuzzy_find", "Find In File" }, + { "fC", "Telescope catppuccin", "Catppuccin Colours" }, { "fj", "Telescope jumplist", "Jumplist" }, }, cmd = "Telescope",