diff --git a/homes/modules/programs/neovim/lua/colors.lua b/homes/modules/programs/neovim/lua/colors.lua index c60c55e..b9f663f 100644 --- a/homes/modules/programs/neovim/lua/colors.lua +++ b/homes/modules/programs/neovim/lua/colors.lua @@ -95,9 +95,9 @@ local function load_colors() vim.api.nvim_set_hl(0, "TelescopePreviewNormal", { bg = bg_90 }) vim.api.nvim_set_hl(0, "TelescopeBorder", { fg = color_15, bg = bg_90 }) - vim.api.nvim_set_hl(0, "TelescopePromptBorder", { fg = color_14, bg = bg_90 }) - vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { fg = color_13, bg = bg_90 }) - vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { fg = color_12, bg = bg_90 }) + vim.api.nvim_set_hl(0, "TelescopePromptBorder", { fg = color_15, bg = bg_90 }) + vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { fg = color_15, bg = bg_90 }) + vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { fg = color_15, bg = bg_90 }) vim.api.nvim_set_hl(0, "TelescopePromptTitle", { fg = color_15, bg = bg_90 }) vim.api.nvim_set_hl(0, "TelescopeResultsTitle", { fg = color_15, bg = bg_90 }) diff --git a/homes/modules/programs/neovim/lua/plugins/telescope.lua b/homes/modules/programs/neovim/lua/plugins/telescope.lua index 31a32cf..9feae5b 100644 --- a/homes/modules/programs/neovim/lua/plugins/telescope.lua +++ b/homes/modules/programs/neovim/lua/plugins/telescope.lua @@ -1,6 +1,7 @@ return { { "telescope.nvim", + enabled = nixCats("telescope.enable") or false, cmd = { "Telescope" }, keys = { { @@ -62,7 +63,14 @@ return { }, load = function(name) vim.cmd.packadd(name) - vim.cmd.packadd("telescope-fzf-native.nvim") + + if nixCats("telescope.fzf") then + vim.cmd.packadd("telescope-fzf-native.nvim") + end + + if nixCats("telescope.zf") then + vim.cmd.packadd("telescope-zf-native.nvim") + end end, after = function(plugin) local telescope = require("telescope") @@ -72,11 +80,6 @@ return { defaults = { border = true, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - -- borderchars = { - -- prompt = { "─", " ", " ", " ", "─", "─", " ", " " }, - -- results = { " " }, - -- preview = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - -- }, mappings = { i = { [""] = actions.move_selection_previous, -- move to prev result @@ -87,7 +90,13 @@ return { }, }) - pcall(telescope.load_extension, "fzf") + if nixCats("telescope.fzf") then + telescope.load_extension("fzf") + end + + if nixCats("telescope.zf") then + telescope.load_extension("zf-native") + end end, }, } diff --git a/homes/modules/programs/neovim/nixcats.nix b/homes/modules/programs/neovim/nixcats.nix index a43ef0e..b2e74c3 100644 --- a/homes/modules/programs/neovim/nixcats.nix +++ b/homes/modules/programs/neovim/nixcats.nix @@ -130,11 +130,14 @@ in { undotree mini-hipatterns ]; - telescope = [ - telescope-nvim - telescope-fzf-native-nvim - telescope-ui-select-nvim - ]; + telescope = { + enable = [ + telescope-nvim + telescope-ui-select-nvim + ]; + fzf = [telescope-fzf-native-nvim]; + zf = [telescope-zf-native-nvim]; + }; fyler = [ fyler-nvim ]; @@ -242,7 +245,15 @@ in { ui = true; qol = true; - telescope = true; + + telescope = { + enable = true; + + # only enable one at a time + fzf = false; + zf = true; + }; + fyler = true; lsp = true;