1
0
Fork 0
dotfiles/.config/nvim/lua/my/plugins.lua

287 lines
9.3 KiB
Lua

local install_path = vim.fn.stdpath('data') ..
'/site/pack/packer/start/packer.nvim'
local packer_bootstrap
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
packer_bootstrap = vim.fn.system({
'git',
'clone',
'https://github.com/wbthomason/packer.nvim',
install_path
})
vim.cmd [[packadd packer.nvim]]
end
require('packer').startup({
function(use)
use { 'https://github.com/wbthomason/packer.nvim' }
-- settings
use { 'https://github.com/owozsh/amora' }
use { 'https://github.com/editorconfig/editorconfig-vim' }
use { 'https://github.com/antoinemadec/FixCursorHold.nvim' }
use { 'https://github.com/ii14/autosplit.nvim' }
-- filetypes
use {
'https://github.com/nvim-treesitter/nvim-treesitter',
tag = '*',
run = [[:TSUpdateSync]]
}
use {
'https://github.com/nvim-orgmode/orgmode',
tag = '*',
requires = 'https://github.com/nvim-treesitter/nvim-treesitter'
}
use {
'https://github.com/JoosepAlviste/nvim-ts-context-commentstring',
requires = 'https://github.com/nvim-treesitter/nvim-treesitter'
}
if vim.version().api_level >= 10 then -- >=0.8.0
use {
'https://github.com/folke/todo-comments.nvim',
requires = { 'https://github.com/nvim-lua/plenary.nvim' }
}
else
use {
'https://github.com/folke/todo-comments.nvim',
requires = { 'https://github.com/nvim-lua/plenary.nvim' },
branch = 'neovim-pre-0.8.0'
}
end
use { 'https://github.com/powerman/vim-plugin-AnsiEsc' }
use {
'https://github.com/lervag/vimtex',
tag = '*',
cond = vim.fn.executable('xelatex') == 1
}
use { 'https://github.com/NvChad/nvim-colorizer.lua' }
use { 'https://github.com/chikamichi/mediawiki.vim' }
if vim.version().api_level >= 10 then -- >=0.8.0
use { 'https://github.com/folke/paint.nvim' }
end
use {
'https://github.com/gennaro-tedesco/nvim-jqx',
tag = '*',
ft = { "json", "yaml" }
}
use { 'https://github.com/isobit/vim-caddyfile' }
-- completion
use {
'https://github.com/hrsh7th/nvim-cmp',
requires = {
'https://github.com/hrsh7th/cmp-nvim-lsp',
'https://github.com/hrsh7th/cmp-buffer',
'https://github.com/hrsh7th/cmp-path',
'https://github.com/hrsh7th/cmp-cmdline',
{
'https://github.com/saadparwaiz1/cmp_luasnip',
requires = 'https://github.com/L3MON4D3/LuaSnip'
},
'https://github.com/hrsh7th/cmp-nvim-lua',
'https://github.com/uga-rosa/cmp-dictionary',
'https://github.com/f3fora/cmp-spell',
'https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol',
'https://github.com/tamago324/cmp-zsh',
{
'https://github.com/paopaol/cmp-doxygen',
requires = {
'https://github.com/nvim-treesitter/nvim-treesitter',
'https://github.com/nvim-treesitter/nvim-treesitter-textobjects'
}
},
'https://github.com/onsails/lspkind.nvim'
}
}
-- lsp
use {
'https://github.com/neovim/nvim-lspconfig',
tag = '*',
requires = 'https://github.com/hrsh7th/cmp-nvim-lsp'
}
use {
'https://github.com/lukas-reineke/lsp-format.nvim',
tag = '*'
}
use { 'https://github.com/ray-x/lsp_signature.nvim' }
use { 'https://github.com/p00f/clangd_extensions.nvim' }
use {
'https://github.com/simrat39/rust-tools.nvim',
requires = { 'neovim/nvim-lspconfig' }
}
-- tools
local nerdfont_installed = require('my.functions').nerdfont_installed()
use { 'https://github.com/folke/which-key.nvim' }
use {
'https://github.com/nvim-telescope/telescope.nvim',
tag = '*',
requires = {
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-treesitter/nvim-treesitter',
{
'https://github.com/kyazdani42/nvim-web-devicons',
cond = nerdfont_installed
}
},
}
use {
'https://github.com/nvim-telescope/telescope-fzf-native.nvim',
run = [[make]]
}
use {
'https://github.com/kyazdani42/nvim-tree.lua',
tag = '*',
requires = {
{
'https://github.com/kyazdani42/nvim-web-devicons',
cond = nerdfont_installed
}
}
}
use {
'https://github.com/nvim-lualine/lualine.nvim',
requires = {
{
'https://github.com/kyazdani42/nvim-web-devicons',
cond = nerdfont_installed
},
'https://github.com/nvim-lua/lsp-status.nvim'
}
}
use { 'https://codeberg.org/tastytea/bug-reference.nvim' }
use {
'https://github.com/phaazon/mind.nvim',
tag = '*'
}
use {
'https://github.com/dhruvasagar/vim-table-mode',
tag = '*'
}
use { 'https://github.com/stevearc/dressing.nvim' }
use {
'https://github.com/rcarriga/nvim-notify',
tag = '*'
}
use {
'https://github.com/gaoDean/autolist.nvim',
tag = '*'
}
use {
'https://github.com/ThePrimeagen/harpoon',
requires = {
'https://github.com/nvim-lua/plenary.nvim'
}
}
use {
'https://github.com/lambdalisue/suda.vim',
tag = '*'
}
use {
'https://github.com/LittleMorph/copyright-updater.nvim'
}
-- coding
use {
'https://github.com/numToStr/Comment.nvim',
tag = '*'
}
use { 'https://github.com/windwp/nvim-autopairs' }
use { 'https://github.com/L3MON4D3/LuaSnip' }
use {
'https://github.com/GnikDroy/projections.nvim',
branch = 'pre_release' }
use {
'https://github.com/mfussenegger/nvim-dap',
tag = '*'
}
use {
'https://github.com/rcarriga/nvim-dap-ui',
tag = '*',
requires = 'https://github.com/mfussenegger/nvim-dap'
}
use {
'https://github.com/nvim-telescope/telescope-dap.nvim',
requires = 'https://github.com/mfussenegger/nvim-dap'
}
use {
'https://github.com/theHamsta/nvim-dap-virtual-text',
requires = 'https://github.com/mfussenegger/nvim-dap'
}
use {
'https://github.com/krady21/compiler-explorer.nvim',
requires = { 'https://github.com/nvim-lua/plenary.nvim' }
}
use {
'https://github.com/AckslD/nvim-FeMaco.lua'
}
use {
'https://github.com/danymat/neogen',
requires = 'https://github.com/nvim-treesitter/nvim-treesitter',
tag = '*'
}
-- git
use {
'https://github.com/TimUntersberger/neogit',
requires = {
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/folke/which-key.nvim',
'https://github.com/sindrets/diffview.nvim'
}
}
use {
'https://github.com/tpope/vim-fugitive',
tag = '*'
}
use {
'https://github.com/lewis6991/gitsigns.nvim',
tag = '*'
}
use {
'https://github.com/linrongbin16/gitlinker.nvim',
requires = { 'https://github.com/nvim-lua/plenary.nvim' }
}
-- net
use { -- embed nvim in browsers
'https://github.com/glacambre/firenvim',
tag = '*',
run = [[call firenvim#install(0)]]
}
-- ensure plugins are installed and compiled
if packer_bootstrap then
require('packer').sync()
end
end,
config = {
git = {
depth = 999999
},
display = {
open_fn = require('packer.util').float
}
}
})
-- source file, install and compile plugins when this file is written
vim.api.nvim_create_augroup('config_plugins', { clear = true })
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
group = 'config_plugins',
pattern = { vim.fn.stdpath('config') .. '/lua/my/plugins.lua' },
command = [[source <afile> | PackerInstall]]
})
vim.api.nvim_create_autocmd({ 'User' }, {
group = 'config_plugins',
pattern = 'PackerComplete',
command = [[PackerCompile]]
})
vim.api.nvim_create_autocmd({ 'User' }, {
group = 'config_plugins',
pattern = 'PackerCompileDone',
command = [[echo 'plugins compiled']]
})