nvim-config/lua/plugins.lua
2023-02-02 16:45:11 -08:00

290 lines
6.0 KiB
Lua

-- Make sure to install packer via the AUR
-- $ yay -S nvim-packer-git
local packer_status_ok, packer = pcall(require, 'packer')
if not packer_status_ok then
return
end
-- consider lazy.nvim
vim.cmd([[packadd packer.nvim]])
packer.startup({
function(use)
-- 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')
--
-- General
--
-- General Lua functions
use({ 'nvim-lua/plenary.nvim' })
use({ 'nvim-lua/popup.nvim' })
-- General optimizations
use({ 'lewis6991/impatient.nvim' })
use({
'nathom/filetype.nvim',
config = function()
vim.g.did_load_filetypes = 1
end,
})
-- General Assets/Resources
use({
'kyazdani42/nvim-web-devicons',
config = function()
require('configs.icons').config()
end,
})
--
-- Style
--
-- Colorscheme (See autocommands.lua)
use({
'lunarvim/darkplus.nvim',
})
--[[ use { '~/builds/darkplus.nvim' } ]]
-- Buffer Line
use({ 'moll/vim-bbye' }) -- Close buffers softly
use({
'akinsho/bufferline.nvim',
-- v3.* requires nvim v0.8+
tag = 'v2.*',
requires = {
{ 'kyazdani42/nvim-web-devicons' },
},
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,
})
-- Status Line
use({
'nvim-lualine/lualine.nvim',
config = function()
require('configs.lualine').config()
end,
})
-- NvimTree
use({
'kyazdani42/nvim-tree.lua',
requires = {
{ 'kyazdani42/nvim-web-devicons' },
},
config = function()
require('configs.nvim-tree').config()
end,
})
-- Show indentation
use({
'lukas-reineke/indent-blankline.nvim',
config = function()
require('configs.indent-blankline').config()
end,
})
-- Telescope (find files, words, git commits, etc)
use({
'nvim-telescope/telescope.nvim',
config = function()
require('configs.telescope').config()
end,
})
-- use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
-- 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,
})
--
-- Treesitter
--
-- Treesitter
use({
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
require('configs.treesitter').config()
end,
})
-- Auto-close tags
use({ 'windwp/nvim-ts-autotag', after = 'nvim-treesitter' })
-- Context-based auto commenting
use({ 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' })
-- Show context
use({
'nvim-treesitter/nvim-treesitter-context',
config = function()
require('configs.treesitter-context').config()
end,
})
--
-- LSP
--
-- Cursorhold fix
use({
'antoinemadec/FixCursorHold.nvim',
config = function()
vim.g.cursorhold_updatetime = 300
end,
})
-- Built-In LSP Config
use({
'neovim/nvim-lspconfig',
-- event = 'BufRead',
config = function()
require('configs.lspconfig').config()
end,
})
-- TODO: LSP Enhancer
use({
'tami5/lspsaga.nvim',
config = function()
require('configs.lspsaga').config()
end,
})
-- TODO: Symbols Outline
-- use { 'simrat39'/symbols-outline.nvim', cmd = 'SymbolsOutline', setup = function ... }
-- Formatting + Linting
use({
'jose-elias-alvarez/null-ls.nvim',
event = 'BufRead',
config = function()
require('configs.null-ls').config()
end,
})
-- highlight hovered-over text
use({
'RRethy/vim-illuminate',
config = function()
require('configs.illuminate').config()
end,
})
--
-- Autocompletion
--
-- Autocompletion Engine
use({
'hrsh7th/nvim-cmp',
config = function()
require('configs.cmp').config()
end,
})
-- Snippet Engine (for nvim-cmp)
-- TODO: Add snippets? rafamadriz/friendly-snippets is too cow for me and has too many snippets.
-- I'd like to use my own collection exclusively (unless there is a better, less extensive collection)
use({ 'L3MON4D3/LuaSnip' })
-- Autocompletion Sources
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
--
-- Dashboard
use({
'goolord/alpha-nvim',
requires = { 'kyazdani42/nvim-web-devicons' },
config = function()
require('configs.alpha').config()
end,
})
-- Autopairs
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',
})
-- Automatically colorize color strings (#f1b8f1)
use({
'norcalli/nvim-colorizer.lua',
config = function()
require('configs.colorizer').config()
end,
})
-- Remember your last place when opening a file
use({ 'farmergreg/vim-lastplace' })
-- Import sorting for python (:Isort)
use({ 'stsewd/isort.nvim', run = ':UpdateRemotePlugins' })
-- Formatting for python (:call Black())
use({ 'averms/black-nvim', run = ':UpdateRemotePlugins' })
end,
config = {
display = {
open_fn = function()
return require('packer.util').float({ border = 'rounded' })
end,
},
profile = {
enable = true,
threshold = 0.0001,
},
},
})