♻️ 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 {
|
return {
|
||||||
"ThePrimeagen/refactoring.nvim",
|
"ThePrimeagen/refactoring.nvim",
|
||||||
requires = {
|
requires = {
|
||||||
|
@ -8,7 +6,7 @@ return {
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("refactoring")
|
require("telescope").load_extension("refactoring")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope-dap.nvim",
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("dap")
|
require("telescope").load_extension("dap")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ThePrimeagen/git-worktree.nvim",
|
"ThePrimeagen/git-worktree.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("git_worktree")
|
require("telescope").load_extension("git_worktree")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
|
@ -21,7 +19,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("harpoon")
|
require("telescope").load_extension("harpoon")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"piersolenski/telescope-import.nvim",
|
"piersolenski/telescope-import.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
import = {
|
import = {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"tsakirist/telescope-lazy.nvim",
|
"tsakirist/telescope-lazy.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("lazy")
|
require("telescope").load_extension("lazy")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"benfowler/telescope-luasnip.nvim",
|
"benfowler/telescope-luasnip.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("luasnip")
|
require("telescope").load_extension("luasnip")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"dharmx/telescope-media.nvim",
|
"dharmx/telescope-media.nvim",
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
media = {
|
media = {
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"cljoly/telescope-repo.nvim",
|
"cljoly/telescope-repo.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
repo = {
|
repo = {
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"debugloop/telescope-undo.nvim",
|
"debugloop/telescope-undo.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
undo = {
|
undo = {
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"jvgrootveld/telescope-zoxide",
|
"jvgrootveld/telescope-zoxide",
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
extensions = {
|
extensions = {
|
||||||
zoxide = {
|
zoxide = {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"voldikss/vim-floaterm",
|
"voldikss/vim-floaterm",
|
||||||
|
@ -36,7 +34,7 @@ return {
|
||||||
{
|
{
|
||||||
"dawsers/telescope-floaterm.nvim",
|
"dawsers/telescope-floaterm.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
Util.on_load("telescope.nvim", function()
|
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||||
require("telescope").load_extension("floaterm")
|
require("telescope").load_extension("floaterm")
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Add table
Reference in a new issue