♻️ refactor(nvim): avoid creating a variable for the onload function in the telescope extensions
This commit is contained in:
parent
b279eccf16
commit
d0fe35b0c9
12 changed files with 18 additions and 42 deletions
|
@ -1,5 +1,3 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
requires = {
|
||||
|
@ -8,7 +6,7 @@ return {
|
|||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("refactoring")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope-dap.nvim",
|
||||
config = function()
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("dap")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/git-worktree.nvim",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("git_worktree")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
|
@ -21,7 +19,7 @@ return {
|
|||
},
|
||||
},
|
||||
config = function()
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("harpoon")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"piersolenski/telescope-import.nvim",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
import = {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"tsakirist/telescope-lazy.nvim",
|
||||
config = function()
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("lazy")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"benfowler/telescope-luasnip.nvim",
|
||||
config = function()
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("luasnip")
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
"dharmx/telescope-media.nvim",
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
media = {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"cljoly/telescope-repo.nvim",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
repo = {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"debugloop/telescope-undo.nvim",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
undo = {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"jvgrootveld/telescope-zoxide",
|
||||
config = function(_, opts)
|
||||
Util.on_load("telescope.nvim", function()
|
||||
config = function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
zoxide = {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"voldikss/vim-floaterm",
|
||||
|
@ -36,7 +34,7 @@ return {
|
|||
{
|
||||
"dawsers/telescope-floaterm.nvim",
|
||||
config = function()
|
||||
Util.on_load("telescope.nvim", function()
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("floaterm")
|
||||
end)
|
||||
end,
|
||||
|
|
Loading…
Add table
Reference in a new issue