220 lines
5.6 KiB
Lua
220 lines
5.6 KiB
Lua
vim.cmd([[
|
|
augroup packer_user_config
|
|
autocmd!
|
|
autocmd BufWritePost my_plugins.lua source <afile> | PackerCompile
|
|
augroup end
|
|
]])
|
|
|
|
local fn = vim.fn
|
|
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
|
packer_bootstrap = fn.system({
|
|
'git',
|
|
'clone',
|
|
'--depth',
|
|
'1',
|
|
'https://github.com/wbthomason/packer.nvim',
|
|
install_path,
|
|
})
|
|
end
|
|
vim.api.nvim_command('packadd packer.nvim')
|
|
|
|
local function get_setup(name)
|
|
return string.format('require("setup/%s")', name)
|
|
end
|
|
|
|
local packerUtil = require('packer.util')
|
|
require('packer').init({
|
|
snapshot_path = packerUtil.join_paths(vim.fn.stdpath('config'), 'snapshots'),
|
|
display = {
|
|
open_fn = require('packer.util').float,
|
|
},
|
|
})
|
|
|
|
return require('packer').startup(function()
|
|
-- Packer can manage itself as an optional plugin
|
|
use({ 'wbthomason/packer.nvim' })
|
|
use({
|
|
'nvim-treesitter/nvim-treesitter',
|
|
run = ':TSUpdate',
|
|
config = get_setup('treesitter'),
|
|
})
|
|
use({
|
|
'nvim-telescope/telescope.nvim',
|
|
requires = {
|
|
{ 'nvim-lua/popup.nvim' },
|
|
{ 'nvim-lua/plenary.nvim' },
|
|
{ 'kyazdani42/nvim-web-devicons' },
|
|
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
|
|
},
|
|
config = get_setup('telescope'),
|
|
})
|
|
use({
|
|
'sainnhe/gruvbox-material',
|
|
disable = true,
|
|
config = get_setup('my_gruvbox-material')
|
|
})
|
|
use({
|
|
'ellisonleao/gruvbox.nvim',
|
|
disable = false,
|
|
config = get_setup('gruvbox'),
|
|
})
|
|
use({
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
requires = {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
},
|
|
config = get_setup('indent_blankline'),
|
|
})
|
|
use({ 'nvim-lua/plenary.nvim' })
|
|
use({
|
|
'lewis6991/gitsigns.nvim',
|
|
config = get_setup('gitsigns'),
|
|
})
|
|
use({
|
|
'kyazdani42/nvim-tree.lua',
|
|
requires = 'kyazdani42/nvim-web-devicons',
|
|
config = get_setup('nvim-tree'),
|
|
disable = true,
|
|
})
|
|
use({
|
|
'numToStr/Comment.nvim',
|
|
config = get_setup('comment'),
|
|
})
|
|
use({
|
|
'hrsh7th/nvim-cmp',
|
|
requires = {
|
|
{ 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' },
|
|
{ 'L3MON4D3/LuaSnip', after = 'nvim-cmp' },
|
|
{ 'saadparwaiz1/cmp_luasnip', after = { 'nvim-cmp', 'LuaSnip' } },
|
|
{ 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
|
|
{ 'octaltree/cmp-look', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-path', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-calc', after = 'nvim-cmp' },
|
|
{ 'f3fora/cmp-spell', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-emoji', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' },
|
|
{ 'ray-x/cmp-treesitter', after = 'nvim-cmp' },
|
|
{ 'hrsh7th/cmp-nvim-lsp-signature-help', after = 'nvim-cmp' }
|
|
},
|
|
config = get_setup('cmp'),
|
|
})
|
|
use({ 'L3MON4D3/LuaSnip', config = get_setup('luasnip') })
|
|
use({ 'rafamadriz/friendly-snippets' })
|
|
use({ 'onsails/lspkind-nvim' })
|
|
use({ 'Shatur/neovim-cmake', requires = { 'mfussenegger/nvim-dap' }, config = get_setup('cmake') })
|
|
use({
|
|
'hoob3rt/lualine.nvim',
|
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
|
config = get_setup('lualine'),
|
|
})
|
|
use({
|
|
'ahmedkhalf/project.nvim',
|
|
config = get_setup('project'),
|
|
})
|
|
use({ 'p00f/nvim-ts-rainbow',
|
|
requires = 'nvim-treesitter/nvim-treesitter',
|
|
after = 'nvim-treesitter' })
|
|
use({
|
|
'windwp/nvim-autopairs',
|
|
config = get_setup('nvim-autopairs'),
|
|
})
|
|
use({ 'ray-x/lsp_signature.nvim' })
|
|
use({
|
|
's1n7ax/nvim-terminal',
|
|
config = get_setup('terminal'),
|
|
})
|
|
use({
|
|
'williamboman/nvim-lsp-installer',
|
|
requires = {
|
|
'neovim/nvim-lspconfig',
|
|
'p00f/clangd_extensions.nvim',
|
|
},
|
|
config = get_setup('lspinstall'),
|
|
disable = true,
|
|
})
|
|
use {
|
|
'williamboman/mason.nvim',
|
|
requires = {
|
|
'neovim/nvim-lspconfig',
|
|
'williamboman/mason-lspconfig.nvim',
|
|
},
|
|
config = get_setup('my_mason')
|
|
}
|
|
use({
|
|
'p00f/clangd_extensions.nvim'
|
|
})
|
|
use({
|
|
'neovim/nvim-lspconfig',
|
|
requires = {
|
|
'p00f/clangd_extensions.nvim',
|
|
},
|
|
config = get_setup('my_lspconfig'),
|
|
})
|
|
use({
|
|
'jose-elias-alvarez/null-ls.nvim',
|
|
requires = { 'nvim-lua/plenary.nvim' },
|
|
})
|
|
use({
|
|
'danymat/neogen',
|
|
requires = 'nvim-treesitter/nvim-treesitter',
|
|
after = 'nvim-treesitter',
|
|
config = get_setup('neogen'),
|
|
})
|
|
use({ 'stevearc/dressing.nvim' })
|
|
use({
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
after = 'nvim-treesitter',
|
|
requires = 'nvim-treesitter/nvim-treesitter',
|
|
})
|
|
use({
|
|
'nvim-neo-tree/neo-tree.nvim',
|
|
requires = {
|
|
'nvim-lua/plenary.nvim',
|
|
'kyazdani42/nvim-web-devicons',
|
|
'MunifTanjim/nui.nvim',
|
|
},
|
|
config = get_setup('neo-tree'),
|
|
})
|
|
use({
|
|
'akinsho/toggleterm.nvim',
|
|
config = get_setup('toggleterm'),
|
|
})
|
|
use({
|
|
'gfeiyou/command-center.nvim',
|
|
requires = { 'nvim-telescope/telescope.nvim' },
|
|
config = get_setup('my_command_center'),
|
|
})
|
|
use({
|
|
'gbprod/yanky.nvim',
|
|
config = get_setup('yanky')
|
|
})
|
|
use {
|
|
'ldelossa/litee.nvim',
|
|
requires = {
|
|
'ldelossa/litee-calltree.nvim',
|
|
'ldelossa/litee-symboltree.nvim',
|
|
'ldelossa/gh.nvim'
|
|
},
|
|
config = get_setup('my_litee')
|
|
}
|
|
use {
|
|
'stevearc/aerial.nvim',
|
|
config = get_setup('aerial')
|
|
}
|
|
use {
|
|
'm-demare/hlargs.nvim',
|
|
requires = { 'nvim-treesitter/nvim-treesitter' },
|
|
config = get_setup('my_hlargs')
|
|
}
|
|
use {
|
|
'ggandor/leap.nvim',
|
|
requires = {'tpope/vim-repeat'},
|
|
config = get_setup('my_leap')
|
|
}
|
|
if packer_bootstrap then
|
|
require('packer').sync()
|
|
end
|
|
end)
|