Skip to content

Commit

Permalink
fix: rework telescope extensions #81
Browse files Browse the repository at this point in the history
  • Loading branch information
Allaman committed May 5, 2024
1 parent be2219a commit 24fc031
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
3 changes: 3 additions & 0 deletions lua/core/plugins/emoji.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ return {
enable_cmp_integration = config.enable_cmp_integration,
plugin_path = config.plugin_path,
},
config = function()
require("telescope").load_extension("emoji")
end,
dev = true,
}
28 changes: 9 additions & 19 deletions lua/core/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,6 @@ local default_config = {
},
config_function = function(opts)
telescope.setup(opts)

if plugins.noice.enable then
telescope.load_extension("noice")
end

if plugins.telescope.fzf_native then
telescope.load_extension("fzf")
end

if plugins.emoji.enable then
telescope.load_extension("emoji")
end

if (plugins.ts_advanced_git_search or false) and plugins.ts_advanced_git_search.enabled then
telescope.load_extension("advanced_git_search")
end
end,
opts = {
extensions = {
Expand Down Expand Up @@ -231,16 +215,22 @@ return {
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = config.fzf_native, build = "make" },
},
keys = config.keys,
opts = config.opts,
config = function(_, opts)
config.config_function(opts)
end,
},

{
"nvim-telescope/telescope-fzf-native.nvim",
enabled = config.fzf_native,
build = "make",
config = function()
telescope.load_extension("fzf")
end,
},

{
"jvgrootveld/telescope-zoxide", -- TODO: configurable
config = function()
Expand Down

0 comments on commit 24fc031

Please sign in to comment.