my-nvim-setup/lua/plugins/init.lua

268 lines
6.3 KiB
Lua
Raw Permalink Normal View History

2022-01-30 07:21:46 +00:00
local plugins = {
["nvim-lua/plenary.nvim"] = { module = "plenary" },
["lewis6991/impatient.nvim"] = {},
2022-08-06 04:35:20 +01:00
["wbthomason/packer.nvim"] = {
2022-08-07 08:28:16 +01:00
cmd = require("core.lazy_load").packer_cmds,
2022-08-06 04:35:20 +01:00
config = function()
require "plugins"
2022-08-07 06:27:58 +01:00
end,
2022-08-06 04:35:20 +01:00
},
2023-03-23 02:33:35 +00:00
["NvChad/extensions"] = { branch = "main", module = { "telescope", "nvchad" } },
["NvChad/base46"] = {
branch = "master",
config = function()
local ok, base46 = pcall(require, "base46")
if ok then
base46.load_theme()
end
end,
},
["NvChad/ui"] = {
2023-03-23 02:33:35 +00:00
branch = "main",
after = "base46",
config = function()
local present, nvchad_ui = pcall(require, "nvchad_ui")
if present then
nvchad_ui.setup()
end
end,
},
["NvChad/nvterm"] = {
module = "nvterm",
config = function()
require "plugins.configs.nvterm"
end,
setup = function()
require("core.utils").load_mappings "nvterm"
end,
},
2023-01-16 22:32:48 +00:00
["nvim-tree/nvim-web-devicons"] = {
after = "ui",
module = "nvim-web-devicons",
commit = "dd468f6991a4e447607097dfc89d47ae97d14dea",
config = function()
require("plugins.configs.others").devicons()
end,
},
["kdheepak/tabline.nvim"] = {
after = "ui",
},
["nvim-lualine/lualine.nvim"] = {
after = "tabline.nvim",
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
config = function()
require("plugins.configs.lualine")
end,
},
["lukas-reineke/indent-blankline.nvim"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "indent-blankline.nvim"
require("core.utils").load_mappings "blankline"
end,
config = function()
require("plugins.configs.others").blankline()
end,
},
["NvChad/nvim-colorizer.lua"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "nvim-colorizer.lua"
end,
config = function()
require("plugins.configs.others").colorizer()
end,
},
["nvim-treesitter/nvim-treesitter"] = {
module = "nvim-treesitter",
setup = function()
require("core.lazy_load").on_file_open "nvim-treesitter"
end,
cmd = require("core.lazy_load").treesitter_cmds,
run = ":TSUpdate",
config = function()
require "plugins.configs.treesitter"
end,
},
-- git stuff
["lewis6991/gitsigns.nvim"] = {
ft = "gitcommit",
setup = function()
require("core.lazy_load").gitsigns()
end,
config = function()
require("plugins.configs.others").gitsigns()
end,
},
-- lsp stuff
["williamboman/mason.nvim"] = {
cmd = require("core.lazy_load").mason_cmds,
config = function()
require "plugins.configs.mason"
end,
},
["neovim/nvim-lspconfig"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "nvim-lspconfig"
end,
config = function()
require "plugins.configs.lspconfig"
end,
},
2023-05-21 12:33:42 +01:00
["simrat39/rust-tools.nvim"] = {
after = "nvim-lspconfig",
config = function()
require('rust-tools').setup({})
end,
},
["jose-elias-alvarez/typescript.nvim"] = {
after = "nvim-lspconfig",
config = function()
require("typescript").setup({
disable_commands = false, -- prevent the plugin from creating Vim commands
debug = false, -- enable debug logging for commands
go_to_source_definition = {
fallback = true, -- fall back to standard LSP definition on failure
},
server = { -- pass options to lspconfig's setup method
on_attach = function()
print("attached to TypeScript project")
end,
},
})
end,
},
-- load luasnips + cmp related in insert mode only
["rafamadriz/friendly-snippets"] = {
2022-07-29 09:27:08 +01:00
module = { "cmp", "cmp_nvim_lsp" },
event = "InsertEnter",
},
["hrsh7th/nvim-cmp"] = {
after = "friendly-snippets",
config = function()
require "plugins.configs.cmp"
end,
},
["L3MON4D3/LuaSnip"] = {
wants = "friendly-snippets",
after = "nvim-cmp",
config = function()
require("plugins.configs.others").luasnip()
end,
},
["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip" },
["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip" },
["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua" },
["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp" },
["hrsh7th/cmp-path"] = { after = "cmp-buffer" },
-- misc plugins
["windwp/nvim-autopairs"] = {
after = "nvim-cmp",
config = function()
require("plugins.configs.others").autopairs()
end,
},
["goolord/alpha-nvim"] = {
after = "base46",
disable = false,
config = function()
require "plugins.configs.alpha"
end,
},
["numToStr/Comment.nvim"] = {
module = "Comment",
keys = { "gc", "gb" },
config = function()
require("plugins.configs.others").comment()
end,
setup = function()
require("core.utils").load_mappings "comment"
end,
},
-- file managing , picker etc
2023-01-16 22:32:48 +00:00
["nvim-tree/nvim-tree.lua"] = {
ft = "alpha",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
config = function()
require "plugins.configs.nvimtree"
end,
setup = function()
require("core.utils").load_mappings "nvimtree"
end,
},
["nvim-telescope/telescope.nvim"] = {
cmd = "Telescope",
config = function()
require "plugins.configs.telescope"
end,
setup = function()
require("core.utils").load_mappings "telescope"
end,
},
["GustavoKatel/tasks.nvim"] = {
requires = { "nvim-lua/plenary.nvim" },
},
-- Only load whichkey after all the gui
["folke/which-key.nvim"] = {
disable = true,
module = "which-key",
keys = { "<leader>", '"', "'", "`" },
config = function()
require "plugins.configs.whichkey"
end,
setup = function()
require("core.utils").load_mappings "whichkey"
end,
},
2022-01-30 07:21:46 +00:00
}
-- Load all plugins
local present, packer = pcall(require, "packer")
if present then
vim.cmd "packadd packer.nvim"
-- Override with default plugins with user ones
plugins = require("core.utils").merge_plugins(plugins)
-- load packer init options
local init_options = require("plugins.configs.others").packer_init()
init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim")
packer.init(init_options)
packer.startup { plugins }
end