150 lines
3.7 KiB
Lua
150 lines
3.7 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')
|
|
|
|
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({ 'neovim/nvim-lspconfig' })
|
|
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' })
|
|
use({ 'ellisonleao/gruvbox.nvim' })
|
|
use({
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
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'),
|
|
})
|
|
use({
|
|
'numToStr/Comment.nvim',
|
|
config = get_setup('comment'),
|
|
})
|
|
use({
|
|
'hrsh7th/nvim-cmp',
|
|
requires = {
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
'L3MON4D3/LuaSnip',
|
|
'saadparwaiz1/cmp_luasnip',
|
|
'hrsh7th/cmp-nvim-lua',
|
|
'octaltree/cmp-look',
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-calc',
|
|
'f3fora/cmp-spell',
|
|
'hrsh7th/cmp-emoji',
|
|
'hrsh7th/cmp-cmdline',
|
|
},
|
|
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' })
|
|
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'),
|
|
})
|
|
use({
|
|
'jose-elias-alvarez/null-ls.nvim',
|
|
requires = { 'nvim-lua/plenary.nvim' },
|
|
})
|
|
use({
|
|
'danymat/neogen',
|
|
requires = 'nvim-treesitter/nvim-treesitter',
|
|
config = get_setup('neogen'),
|
|
})
|
|
use({ 'abecodes/tabout.nvim' })
|
|
use({ 'stevearc/dressing.nvim' })
|
|
use({
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
requires = 'nvim-treesitter/nvim-treesitter',
|
|
})
|
|
use({
|
|
'mvllow/modes.nvim',
|
|
config = function()
|
|
vim.opt.cursorline = true
|
|
require('modes').setup({
|
|
focus_only = true,
|
|
line_opacity = 0.2,
|
|
})
|
|
end,
|
|
})
|
|
if packer_bootstrap then
|
|
require('packer').sync()
|
|
end
|
|
end)
|