put all plugin specs in one file

This commit is contained in:
siduck 2024-06-25 20:30:34 +05:30
parent 0891fef69f
commit 61b336c030
2 changed files with 99 additions and 101 deletions

View File

@ -1,5 +1,74 @@
return { return {
{
"NvChad/base46",
branch = "v2.5",
build = function()
require("base46").load_all_highlights()
end,
},
{
"NvChad/ui",
branch = "v2.5",
lazy = false,
config = function()
require "nvchad"
end,
},
{
"nvim-tree/nvim-web-devicons",
opts = function()
return { override = require "nvchad.icons.devicons" }
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
event = "User FilePost",
opts = {
indent = { char = "", highlight = "IblChar" },
scope = { char = "", highlight = "IblScopeChar" },
},
config = function(_, opts)
dofile(vim.g.base46_cache .. "blankline")
local hooks = require "ibl.hooks"
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
require("ibl").setup(opts)
dofile(vim.g.base46_cache .. "blankline")
end,
},
-- file managing , picker etc
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return require "nvchad.configs.nvimtree"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "nvimtree")
require("nvim-tree").setup(opts)
end,
},
{
"folke/which-key.nvim",
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
cmd = "WhichKey",
config = function(_, opts)
dofile(vim.g.base46_cache .. "whichkey")
require("which-key").setup(opts)
end,
},
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
-- formatting! -- formatting!
@ -15,21 +84,6 @@ return {
end, end,
}, },
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
build = ":TSUpdate",
opts = function()
return require "nvchad.configs.treesitter"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax")
dofile(vim.g.base46_cache .. "treesitter")
require("nvim-treesitter.configs").setup(opts)
end,
},
-- git stuff -- git stuff
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
@ -58,7 +112,7 @@ return {
vim.api.nvim_create_user_command("MasonInstallAll", function() vim.api.nvim_create_user_command("MasonInstallAll", function()
if opts.ensure_installed and #opts.ensure_installed > 0 then if opts.ensure_installed and #opts.ensure_installed > 0 then
vim.cmd "Mason" vim.cmd "Mason"
local mr = require("mason-registry") local mr = require "mason-registry"
mr.refresh(function() mr.refresh(function()
for _, tool in ipairs(opts.ensure_installed) do for _, tool in ipairs(opts.ensure_installed) do
@ -150,4 +204,33 @@ return {
end end
end, end,
}, },
{
"NvChad/nvim-colorizer.lua",
event = "User FilePost",
opts = { user_default_options = { names = false } },
config = function(_, opts)
require("colorizer").setup(opts)
-- execute colorizer as soon as possible
vim.defer_fn(function()
require("colorizer").attach_to_buffer(0)
end, 0)
end,
},
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
build = ":TSUpdate",
opts = function()
return require "nvchad.configs.treesitter"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax")
dofile(vim.g.base46_cache .. "treesitter")
require("nvim-treesitter.configs").setup(opts)
end,
},
} }

View File

@ -1,85 +0,0 @@
return {
{
"NvChad/base46",
branch = "v2.5",
build = function()
require("base46").load_all_highlights()
end,
},
{
"NvChad/ui",
branch = "v2.5",
lazy = false,
config = function()
require "nvchad"
end,
},
{
"NvChad/nvim-colorizer.lua",
event = "User FilePost",
opts = { user_default_options = { names = false } },
config = function(_, opts)
require("colorizer").setup(opts)
-- execute colorizer as soon as possible
vim.defer_fn(function()
require("colorizer").attach_to_buffer(0)
end, 0)
end,
},
{
"nvim-tree/nvim-web-devicons",
opts = function()
return { override = require "nvchad.icons.devicons" }
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
event = "User FilePost",
opts = {
indent = { char = "", highlight = "IblChar" },
scope = { char = "", highlight = "IblScopeChar" },
},
config = function(_, opts)
dofile(vim.g.base46_cache .. "blankline")
local hooks = require "ibl.hooks"
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
require("ibl").setup(opts)
dofile(vim.g.base46_cache .. "blankline")
end,
},
-- file managing , picker etc
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return require "nvchad.configs.nvimtree"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "nvimtree")
require("nvim-tree").setup(opts)
end,
},
{
"folke/which-key.nvim",
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
cmd = "WhichKey",
config = function(_, opts)
dofile(vim.g.base46_cache .. "whichkey")
require("which-key").setup(opts)
end,
},
}