2022-08-17 01:47:49 +02:00
|
|
|
local install_path = vim.fn.stdpath('data') ..
|
|
|
|
'/site/pack/packer/start/packer.nvim'
|
2022-08-15 04:06:26 +02:00
|
|
|
local packer_bootstrap
|
2022-08-12 14:09:45 +02:00
|
|
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
|
|
|
packer_bootstrap = vim.fn.system({
|
|
|
|
'git',
|
|
|
|
'clone',
|
|
|
|
'https://github.com/wbthomason/packer.nvim',
|
2022-08-16 21:53:43 +02:00
|
|
|
install_path
|
|
|
|
})
|
2022-08-08 01:41:01 +02:00
|
|
|
vim.cmd [[packadd packer.nvim]]
|
|
|
|
end
|
|
|
|
|
2022-08-15 04:06:26 +02:00
|
|
|
require('packer').startup(function(use)
|
|
|
|
use { 'https://github.com/wbthomason/packer.nvim' }
|
2022-08-08 01:41:01 +02:00
|
|
|
|
2022-08-15 04:06:26 +02:00
|
|
|
-- settings
|
|
|
|
use { 'https://github.com/owozsh/amora' }
|
|
|
|
use { 'https://github.com/editorconfig/editorconfig-vim' }
|
2022-08-17 03:51:08 +02:00
|
|
|
use { 'https://github.com/antoinemadec/FixCursorHold.nvim' }
|
2022-08-08 13:57:38 +02:00
|
|
|
|
2022-08-15 04:06:26 +02:00
|
|
|
-- filetypes
|
|
|
|
use {
|
|
|
|
'https://github.com/nvim-treesitter/nvim-treesitter',
|
|
|
|
run = function()
|
|
|
|
require('nvim-treesitter.install').update({ with_sync = true })
|
|
|
|
end
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'https://github.com/nvim-orgmode/orgmode',
|
|
|
|
tag = '*',
|
|
|
|
requires = 'https://github.com/nvim-treesitter/nvim-treesitter'
|
|
|
|
}
|
2022-08-16 02:49:33 +02:00
|
|
|
use {
|
|
|
|
'https://github.com/JoosepAlviste/nvim-ts-context-commentstring',
|
|
|
|
requires = 'https://github.com/nvim-treesitter/nvim-treesitter'
|
|
|
|
}
|
2022-08-15 04:06:26 +02:00
|
|
|
|
|
|
|
-- 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',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-- lsp
|
|
|
|
use {
|
|
|
|
'https://github.com/neovim/nvim-lspconfig',
|
|
|
|
tag = '*',
|
|
|
|
requires = 'https://github.com/hrsh7th/cmp-nvim-lsp'
|
|
|
|
}
|
2022-08-16 21:53:43 +02:00
|
|
|
use {
|
|
|
|
'https://github.com/lukas-reineke/lsp-format.nvim',
|
|
|
|
tag = '*'
|
|
|
|
}
|
2022-08-17 03:42:10 +02:00
|
|
|
use { 'https://github.com/ray-x/lsp_signature.nvim' }
|
2022-08-15 04:06:26 +02:00
|
|
|
|
|
|
|
-- tools
|
|
|
|
use {
|
2022-08-17 01:47:49 +02:00
|
|
|
'https://github.com/folke/which-key.nvim',
|
|
|
|
config = function()
|
|
|
|
require('which-key').setup({})
|
|
|
|
end
|
2022-08-15 04:06:26 +02:00
|
|
|
}
|
|
|
|
use {
|
|
|
|
'https://github.com/nvim-telescope/telescope.nvim',
|
|
|
|
tag = '*',
|
|
|
|
requires = {
|
|
|
|
'https://github.com/nvim-lua/plenary.nvim',
|
|
|
|
'https://github.com/nvim-treesitter/nvim-treesitter',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'https://github.com/nvim-telescope/telescope-media-files.nvim',
|
|
|
|
requires = {
|
|
|
|
'https://github.com/nvim-lua/popup.nvim',
|
|
|
|
'https://github.com/nvim-lua/plenary.nvim',
|
|
|
|
'https://github.com/nvim-telescope/telescope.nvim'
|
|
|
|
}
|
|
|
|
}
|
2022-08-16 21:38:31 +02:00
|
|
|
use {
|
|
|
|
'https://github.com/kyazdani42/nvim-tree.lua',
|
|
|
|
tag = '*'
|
|
|
|
}
|
2022-08-15 04:06:26 +02:00
|
|
|
|
|
|
|
-- coding
|
|
|
|
use {
|
2022-08-16 02:49:33 +02:00
|
|
|
'https://github.com/numToStr/Comment.nvim',
|
|
|
|
tag = '*'
|
2022-08-15 04:06:26 +02:00
|
|
|
}
|
|
|
|
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/gentoo/gentoo-syntax' }
|
2022-08-16 01:55:20 +02:00
|
|
|
use {
|
|
|
|
'https://github.com/windwp/nvim-autopairs',
|
2022-08-16 21:53:43 +02:00
|
|
|
config = function() require("nvim-autopairs").setup {} end
|
2022-08-15 04:06:26 +02:00
|
|
|
}
|
|
|
|
use { 'https://github.com/L3MON4D3/LuaSnip' }
|
2022-08-16 05:00:13 +02:00
|
|
|
use {
|
|
|
|
'https://github.com/tpope/vim-fugitive',
|
|
|
|
tag = '*'
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'https://github.com/lewis6991/gitsigns.nvim',
|
|
|
|
tag = '*'
|
|
|
|
}
|
2022-08-15 04:06:26 +02:00
|
|
|
|
|
|
|
-- net
|
2022-08-16 21:53:43 +02:00
|
|
|
use { -- embed nvim in browsers
|
2022-08-15 04:06:26 +02:00
|
|
|
'https://github.com/glacambre/firenvim',
|
|
|
|
tag = '*',
|
|
|
|
run = function()
|
|
|
|
vim.fn['firenvim#install'](0)
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
-- ensure plugins are installed and compiled
|
|
|
|
if packer_bootstrap then
|
|
|
|
require('packer').sync()
|
|
|
|
elseif not io.open(vim.fn.stdpath('config') .. '/plugin') then
|
|
|
|
require('packer').install()
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- source file, install and compile plugins when this file is written
|
|
|
|
vim.api.nvim_create_augroup('config_plugins', { clear = true })
|
2022-08-10 17:34:00 +02:00
|
|
|
vim.api.nvim_create_autocmd(
|
|
|
|
{ 'BufWritePost' },
|
|
|
|
{
|
2022-08-15 04:06:26 +02:00
|
|
|
group = 'config_plugins',
|
2022-08-15 20:59:18 +02:00
|
|
|
pattern = { vim.fn.stdpath('config') .. '/lua/my/plugins.lua' },
|
2022-08-16 21:53:43 +02:00
|
|
|
command = [[source <afile> | PackerInstall]]
|
2022-08-10 17:34:00 +02:00
|
|
|
}
|
|
|
|
)
|
2022-08-12 00:06:42 +02:00
|
|
|
vim.api.nvim_create_autocmd(
|
|
|
|
{ 'User' },
|
|
|
|
{
|
2022-08-15 04:06:26 +02:00
|
|
|
group = 'config_plugins',
|
2022-08-12 00:06:42 +02:00
|
|
|
pattern = 'PackerComplete',
|
2022-08-12 05:09:26 +02:00
|
|
|
command = [[PackerCompile]]
|
2022-08-12 00:06:42 +02:00
|
|
|
}
|
|
|
|
)
|
|
|
|
vim.api.nvim_create_autocmd(
|
|
|
|
{ 'User' },
|
|
|
|
{
|
2022-08-15 04:06:26 +02:00
|
|
|
group = 'config_plugins',
|
2022-08-12 00:06:42 +02:00
|
|
|
pattern = 'PackerCompileDone',
|
2022-08-12 05:09:26 +02:00
|
|
|
command = [[echo 'plugins compiled']]
|
2022-08-12 00:06:42 +02:00
|
|
|
}
|
|
|
|
)
|