nvim-config/lua/plugins.lua

288 lines
6.0 KiB
Lua
Raw Normal View History

-- Make sure to install packer via the AUR
-- $ yay -S nvim-packer-git
2023-01-10 18:21:09 +00:00
local packer_status_ok, packer = pcall(require, 'packer')
2022-02-28 03:11:17 +00:00
if not packer_status_ok then
return
end
2023-01-10 18:21:09 +00:00
vim.cmd([[packadd packer.nvim]])
2022-02-28 03:11:17 +00:00
2023-01-10 18:21:09 +00:00
packer.startup({
2022-02-28 03:11:17 +00:00
function(use)
2023-01-10 18:21:09 +00:00
-- git clone --depth 1 https://github.com/wbthomason/packer.nvim \
-- ~/.local/share/nvim/site/pack/packer/start/packer.nvim
-- Packer will try to delete itself otherwise
use('wbthomason/packer.nvim')
2022-09-16 00:05:26 +00:00
--
-- General
--
2022-02-28 03:11:17 +00:00
-- General Lua functions
2023-01-10 18:21:09 +00:00
use({ 'nvim-lua/plenary.nvim' })
use({ 'nvim-lua/popup.nvim' })
2022-02-28 03:11:17 +00:00
-- General optimizations
2023-01-10 18:21:09 +00:00
use({ 'lewis6991/impatient.nvim' })
use({
'nathom/filetype.nvim',
config = function()
vim.g.did_load_filetypes = 1
end,
})
2022-02-28 03:11:17 +00:00
-- General Assets/Resources
2023-01-10 18:21:09 +00:00
use({
'kyazdani42/nvim-web-devicons',
config = function()
require('configs.icons').config()
end,
})
2022-02-28 03:11:17 +00:00
--
-- Style
--
2022-03-01 02:58:43 +00:00
-- Colorscheme (See autocommands.lua)
2023-01-10 18:21:09 +00:00
use({
'lunarvim/darkplus.nvim',
})
2022-10-20 04:01:32 +00:00
--[[ use { '~/builds/darkplus.nvim' } ]]
2022-02-28 03:11:17 +00:00
-- Buffer Line
2023-01-10 18:21:09 +00:00
use({ 'moll/vim-bbye' }) -- Close buffers softly
use({
2022-02-28 03:11:17 +00:00
'akinsho/bufferline.nvim',
2023-01-10 18:21:09 +00:00
-- v3.* requires nvim v0.8+
tag = 'v2.*',
2022-02-28 05:45:40 +00:00
requires = {
2023-01-10 18:21:09 +00:00
{ 'kyazdani42/nvim-web-devicons' },
2022-02-28 05:45:40 +00:00
},
2023-01-10 18:21:09 +00:00
config = function()
require('configs.bufferline').config()
end,
})
-- Git (git-blame must be before lualine)
use({
'lewis6991/gitsigns.nvim',
config = function()
require('configs.gitsigns').config()
end,
})
use({
'f-person/git-blame.nvim',
config = function()
require('configs.git-blame').config()
end,
})
2022-09-27 17:02:49 +00:00
2022-02-28 03:11:17 +00:00
-- Status Line
2023-01-10 18:21:09 +00:00
use({
'nvim-lualine/lualine.nvim',
config = function()
require('configs.lualine').config()
end,
})
-- NvimTree
2023-01-10 18:21:09 +00:00
use({
'kyazdani42/nvim-tree.lua',
2022-02-28 05:45:40 +00:00
requires = {
2023-01-10 18:21:09 +00:00
{ 'kyazdani42/nvim-web-devicons' },
2022-02-28 05:45:40 +00:00
},
2023-01-10 18:21:09 +00:00
config = function()
require('configs.nvim-tree').config()
end,
})
2022-02-28 14:48:12 +00:00
2022-02-28 14:54:52 +00:00
-- Show indentation
2023-01-10 18:21:09 +00:00
use({
'lukas-reineke/indent-blankline.nvim',
config = function()
require('configs.indent-blankline').config()
end,
})
2022-02-28 14:48:12 +00:00
2022-03-01 00:15:55 +00:00
-- Telescope (find files, words, git commits, etc)
2023-01-10 18:21:09 +00:00
use({
'nvim-telescope/telescope.nvim',
config = function()
require('configs.telescope').config()
end,
})
-- use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
2023-01-10 18:21:09 +00:00
-- Sessions
-- use {
-- 'Shatur/neovim-session-manager',
-- commit = '4005dac93f5cd1257792259ef4df6af0e3afc213',
-- config = function() require'configs.session-manager'.config() end
-- }
-- custom build of the above plugin
use({
'~/builds/neovim-session-manager',
config = function()
require('configs.session-manager').config()
end,
})
2022-10-26 17:02:48 +00:00
--
-- Treesitter
--
2022-03-01 02:58:43 +00:00
-- Treesitter
2023-01-10 18:21:09 +00:00
use({
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
2023-01-10 18:21:09 +00:00
config = function()
require('configs.treesitter').config()
end,
})
-- Auto-close tags
2023-01-10 18:21:09 +00:00
use({ 'windwp/nvim-ts-autotag', after = 'nvim-treesitter' })
-- Context-based auto commenting
2023-01-10 18:21:09 +00:00
use({ 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' })
2023-01-10 18:21:09 +00:00
-- Show context
use({
'nvim-treesitter/nvim-treesitter-context',
config = function()
require('configs.treesitter-context').config()
end,
})
--
2022-03-01 02:58:43 +00:00
-- LSP
--
2022-03-01 05:13:18 +00:00
-- Cursorhold fix
2023-01-10 18:21:09 +00:00
use({
'antoinemadec/FixCursorHold.nvim',
config = function()
vim.g.cursorhold_updatetime = 300
end,
})
2022-03-01 06:25:44 +00:00
2022-03-01 02:58:43 +00:00
-- Built-In LSP Config
2023-01-10 18:21:09 +00:00
use({
2022-03-01 02:58:43 +00:00
'neovim/nvim-lspconfig',
2022-09-22 19:13:23 +00:00
-- event = 'BufRead',
2023-01-10 18:21:09 +00:00
config = function()
require('configs.lspconfig').config()
end,
})
2022-03-01 02:58:43 +00:00
-- TODO: LSP Enhancer
2023-01-10 18:21:09 +00:00
use({
2022-03-01 02:58:43 +00:00
'tami5/lspsaga.nvim',
2023-01-10 18:21:09 +00:00
config = function()
require('configs.lspsaga').config()
end,
})
2022-03-01 02:58:43 +00:00
-- TODO: Symbols Outline
-- use { 'simrat39'/symbols-outline.nvim', cmd = 'SymbolsOutline', setup = function ... }
-- Formatting + Linting
2023-01-10 18:21:09 +00:00
use({
'jose-elias-alvarez/null-ls.nvim',
event = 'BufRead',
2023-01-10 18:21:09 +00:00
config = function()
require('configs.null-ls').config()
end,
})
-- highlight hovered-over text
use({
'RRethy/vim-illuminate',
config = function()
require('configs.illuminate').config()
end,
})
2022-03-01 02:58:43 +00:00
--
-- Autocompletion
--
-- Autocompletion Engine
2023-01-10 18:21:09 +00:00
use({
2022-03-01 06:25:44 +00:00
'hrsh7th/nvim-cmp',
2023-01-10 18:21:09 +00:00
config = function()
require('configs.cmp').config()
end,
})
2022-03-01 02:58:43 +00:00
-- Snippet Engine (for nvim-cmp)
-- TODO: Add snippets? rafamadriz/friendly-snippets is too cow for me and has too many snippets.
2022-03-01 02:58:43 +00:00
-- I'd like to use my own collection exclusively (unless there is a better, less extensive collection)
2023-01-10 18:21:09 +00:00
use({ 'L3MON4D3/LuaSnip' })
2022-03-01 02:58:43 +00:00
-- Autocompletion Sources
2023-01-10 18:21:09 +00:00
use({ 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp', requires = { 'nvim-cmp' } })
use({ 'hrsh7th/cmp-buffer', after = 'nvim-cmp', requires = { 'nvim-cmp' } })
use({ 'hrsh7th/cmp-path', after = 'nvim-cmp', requires = { 'nvim-cmp' } })
use({ 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp', requires = { 'nvim-cmp' } })
--
-- Quality of Life
--
2023-01-10 18:21:09 +00:00
-- Dashboard
use({
'goolord/alpha-nvim',
requires = { 'kyazdani42/nvim-web-devicons' },
config = function()
require('configs.alpha').config()
end,
})
2022-10-03 16:39:31 +00:00
2022-03-01 07:49:46 +00:00
-- Autopairs
2023-01-10 18:21:09 +00:00
use({
'windwp/nvim-autopairs',
config = function()
require('configs.autopairs').config()
end,
})
-- Commenting
use({
'numToStr/Comment.nvim',
config = function()
require('configs.comment').config()
end,
after = 'nvim-ts-context-commentstring',
})
2022-02-28 14:41:22 +00:00
-- Automatically colorize color strings (#f1b8f1)
2023-01-10 18:21:09 +00:00
use({
'norcalli/nvim-colorizer.lua',
config = function()
require('configs.colorizer').config()
end,
})
-- Remember your last place when opening a file
2023-01-10 18:21:09 +00:00
use({ 'farmergreg/vim-lastplace' })
2022-09-19 18:56:07 +00:00
2023-01-10 18:21:09 +00:00
-- Import sorting for python (:Isort)
use({ 'stsewd/isort.nvim', run = ':UpdateRemotePlugins' })
2022-09-27 00:51:15 +00:00
2023-01-10 18:21:09 +00:00
-- Formatting for python (:call Black())
use({ 'averms/black-nvim', run = ':UpdateRemotePlugins' })
2022-02-28 03:11:17 +00:00
end,
config = {
display = {
open_fn = function()
2023-01-10 18:21:09 +00:00
return require('packer.util').float({ border = 'rounded' })
end,
2022-03-01 06:25:44 +00:00
},
profile = {
enable = true,
threshold = 0.0001,
2023-01-10 18:21:09 +00:00
},
},
})