diff --git a/lua/astrocommunity/code-runner/toggletasks-nvim/init.lua b/lua/astrocommunity/code-runner/toggletasks-nvim/init.lua index 3fa460094..19e3c070c 100644 --- a/lua/astrocommunity/code-runner/toggletasks-nvim/init.lua +++ b/lua/astrocommunity/code-runner/toggletasks-nvim/init.lua @@ -4,12 +4,21 @@ return { { "nvim-lua/plenary.nvim" }, { "akinsho/toggleterm.nvim" }, { "nvim-telescope/telescope.nvim" }, + { + "AstroNvim/astrocore", + opts = { + mappings = { + n = { + ["tss"] = { "Telescope toggletasks spawn", desc = "toggletasks: spawn" }, + ["tsc"] = { "Telescope toggletasks select", desc = "toggletasks: select" }, + ["tse"] = { "Telescope toggletasks edit", desc = "toggletasks: edit config" }, + }, + }, + }, + }, }, opts = {}, - init = function() require("telescope").load_extension "toggletasks" end, - keys = { - { "tss", "Telescope toggletasks spawn", desc = "toggletasks: spawn" }, - { "tsc", "Telescope toggletasks select", desc = "toggletasks: select" }, - { "tse", "Telescope toggletasks edit", desc = "toggletasks: edit config" }, - }, + init = function() + require("astrocore").on_load("telescope.nvim", function() require("telescope").load_extension "toggletasks" end) + end, }