nvim/lua/config/plugins.lua
2022-10-12 17:55:38 +02:00

204 lines
4.2 KiB
Lua

local packer = require("util.packer")
local config = {
opt_default = true,
auto_reload_compiled = false,
}
local function plugins(use, plugin)
---- Bootstrap
use({ "wbthomason/packer.nvim" })
-- UI
use({ "stevearc/dressing.nvim", event = "User PackerDefered" })
-- Layout
use({
"folke/noice.nvim",
module = "noice",
event = "VimEnter",
config = function()
require("noice").setup()
end,
})
plugin("anuvyklack/windows.nvim")
-- Notifications
use({
"rcarriga/nvim-notify",
event = "User PackerDefered",
module = "notify",
config = function()
require("notify").setup({ level = vim.log.levels.INFO, fps = 20 })
vim.notify = require("notify")
end,
})
---- Explorer
plugin("nvim-neo-tree/neo-tree.nvim")
use({
"MunifTanjim/nui.nvim",
module = "nui",
})
use({
"danymat/neogen",
module = "neogen",
config = function()
require("neogen").setup({ snippet_engine = "luasnip" })
end,
})
-- Status bar
use({
"SmiteshP/nvim-navic",
module = "nvim-navic",
config = function()
vim.g.navic_silence = true
require("nvim-navic").setup({ separator = " ", highlight = true, depth_limit = 5 })
end,
})
plugin("nvim-lualine/lualine.nvim")
-- Bufferline
plugin("nvim-telescope/telescope.nvim")
plugin("lukas-reineke/indent-blankline.nvim")
plugin("akinsho/nvim-bufferline.lua")
plugin("NvChad/nvim-colorizer.lua")
-- Dashboard
plugin("glepnir/dashboard-nvim")
-- Notify
use({
"j-hui/fidget.nvim",
module = "fidget",
config = function()
require("fidget").setup({
window = {
relative = "editor",
},
})
-- HACK: prevent error when exiting Neovim
vim.api.nvim_create_autocmd("VimLeavePre", { command = [[silent! FidgetClose]] })
end,
})
-- smooth scrolling
plugin("karb94/neoscroll.nvim")
---- Code
-- Formatting
plugin("jose-elias-alvarez/null-ls.nvim")
use({ "folke/lua-dev.nvim", module = "lua-dev" })
-- LSP
use({ "neovim/nvim-lspconfig", plugin = "lsp" })
plugin("williamboman/mason.nvim")
use({
"williamboman/mason-lspconfig.nvim",
module = "mason-lspconfig",
})
plugin("simrat39/rust-tools.nvim")
-- Autocomplete
plugin("hrsh7th/nvim-cmp")
use({
"folke/trouble.nvim",
event = "BufReadPre",
module = "trouble",
cmd = { "TroubleToggle", "Trouble" },
config = function()
require("trouble").setup({
auto_open = false,
use_diagnostic_signs = true, -- en
})
end,
})
-- Utility
plugin("windwp/nvim-autopairs")
-- Terminal
plugin("s1n7ax/nvim-terminal")
plugin("akinsho/toggleterm.nvim")
-- Yanking
use({
"AckslD/nvim-neoclip.lua",
event = "TextYankPost",
module = "telescope._extensions.neoclip",
requires = { { "kkharji/sqlite.lua", module = "sqlite" } },
config = function()
require("neoclip").setup({
enable_persistent_history = true,
continuous_sync = true,
})
end,
})
-- Session management
use({
"folke/persistence.nvim",
event = "BufReadPre",
module = "persistence",
config = function()
require("persistence").setup()
end,
})
use({
"dstein64/vim-startuptime",
cmd = "StartupTime",
config = function()
vim.g.startuptime_tries = 10
end,
})
-- Snippets
plugin("L3MON4D3/LuaSnip")
-- Syntax
use({ "nvim-lua/plenary.nvim", module = "plenary" })
plugin("nvim-treesitter/nvim-treesitter")
use({ "nvim-treesitter/playground", cmd = { "TSHighlightCapturesUnderCursor", "TSPlaygroundToggle" } })
use({
"m-demare/hlargs.nvim",
module = "hlargs",
event = "User PackerDefered",
requires = {
"nvim-treesitter",
},
config = function()
require("hlargs").setup({
color = require("tokyonight.colors").setup().yellow,
})
end,
})
use({
"folke/which-key.nvim",
branch = "mapping_dsl",
module = "which-key",
})
-- Theme: color scheme
plugin("folke/tokyonight.nvim")
-- Theme: Icons
use({
"kyazdani42/nvim-web-devicons",
module = "nvim-web-devicons",
config = function()
require("nvim-web-devicons").setup({ default = true })
end,
})
end
return packer.setup(config, plugins)