nvim/lua/config/plugins.lua

204 lines
4.2 KiB
Lua
Raw Permalink Normal View History

2022-10-09 19:20:47 +02:00
local packer = require("util.packer")
local config = {
opt_default = true,
auto_reload_compiled = false,
}
local function plugins(use, plugin)
2022-10-09 22:40:29 +02:00
---- Bootstrap
2022-10-09 19:20:47 +02:00
use({ "wbthomason/packer.nvim" })
2022-10-09 22:40:29 +02:00
-- 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
2022-10-09 19:20:47 +02:00
plugin("nvim-neo-tree/neo-tree.nvim")
use({
"MunifTanjim/nui.nvim",
module = "nui",
})
2022-10-09 22:40:29 +02:00
use({
"danymat/neogen",
module = "neogen",
config = function()
require("neogen").setup({ snippet_engine = "luasnip" })
end,
})
2022-10-09 19:20:47 +02:00
2022-10-09 22:40:29 +02:00
-- 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,
})
2022-10-09 19:20:47 +02:00
2022-10-09 22:40:29 +02:00
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
2022-10-09 19:20:47 +02:00
use({
2022-10-09 22:40:29 +02:00
"j-hui/fidget.nvim",
module = "fidget",
2022-10-09 19:20:47 +02:00
config = function()
2022-10-09 22:40:29 +02:00
require("fidget").setup({
window = {
relative = "editor",
},
})
-- HACK: prevent error when exiting Neovim
vim.api.nvim_create_autocmd("VimLeavePre", { command = [[silent! FidgetClose]] })
2022-10-09 19:20:47 +02:00
end,
})
2022-10-09 22:40:29 +02:00
-- 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",
})
2022-10-12 17:55:25 +02:00
plugin("simrat39/rust-tools.nvim")
2022-10-09 22:40:29 +02:00
-- 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")
2022-10-12 17:55:25 +02:00
-- Terminal
plugin("s1n7ax/nvim-terminal")
plugin("akinsho/toggleterm.nvim")
2022-10-09 22:40:29 +02:00
-- 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")
2022-10-09 19:20:47 +02:00
2022-10-09 22:40:29 +02:00
-- Syntax
use({ "nvim-lua/plenary.nvim", module = "plenary" })
plugin("nvim-treesitter/nvim-treesitter")
2022-10-09 19:20:47 +02:00
use({ "nvim-treesitter/playground", cmd = { "TSHighlightCapturesUnderCursor", "TSPlaygroundToggle" } })
2022-10-09 22:40:29 +02:00
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",
2022-10-12 17:55:25 +02:00
branch = "mapping_dsl",
2022-10-09 22:40:29 +02:00
module = "which-key",
})
2022-10-09 19:20:47 +02:00
2022-10-09 22:40:29 +02:00
-- 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,
})
2022-10-09 19:20:47 +02:00
end
return packer.setup(config, plugins)