2021-09-07 23:26:21 +08:00
|
|
|
return require('packer').startup(function(use)
|
2022-08-07 21:00:11 +08:00
|
|
|
use {'wbthomason/packer.nvim'}
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- core UI
|
2022-09-03 21:52:49 +08:00
|
|
|
use({
|
|
|
|
'sainnhe/everforest',
|
2022-03-26 12:16:23 +08:00
|
|
|
config = function()
|
2022-09-03 21:52:49 +08:00
|
|
|
vim.g.everforest_better_performance = 1
|
|
|
|
vim.cmd('colorscheme everforest')
|
2022-03-26 12:16:23 +08:00
|
|
|
end
|
2022-09-03 21:52:49 +08:00
|
|
|
})
|
2022-08-07 21:00:11 +08:00
|
|
|
use {'kyazdani42/nvim-web-devicons'}
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
2022-05-12 21:36:31 +08:00
|
|
|
'nvim-lualine/lualine.nvim',
|
2022-09-03 21:52:49 +08:00
|
|
|
after = {'nvim-web-devicons'},
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require 'plugins.statusline' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2022-08-07 21:00:11 +08:00
|
|
|
use {
|
|
|
|
'romgrk/barbar.nvim',
|
|
|
|
requires = {'kyazdani42/nvim-web-devicons'},
|
|
|
|
event = 'BufAdd',
|
2022-09-03 21:52:49 +08:00
|
|
|
after = {'nvim-web-devicons'},
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require 'plugins.barbar' end
|
2022-08-07 21:00:11 +08:00
|
|
|
}
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- lsp stuff
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'neovim/nvim-lspconfig', event = 'UIEnter'}
|
2021-09-27 11:56:17 +08:00
|
|
|
use {
|
2021-12-01 21:21:16 +08:00
|
|
|
'williamboman/nvim-lsp-installer',
|
2022-08-07 22:57:52 +08:00
|
|
|
after = 'nvim-lspconfig',
|
|
|
|
config = function() require 'plugins.lspinstall' end
|
2021-09-27 11:56:17 +08:00
|
|
|
}
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'hrsh7th/cmp-nvim-lsp', after = 'nvim-lsp-installer'}
|
2022-05-12 21:36:31 +08:00
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'ray-x/lsp_signature.nvim',
|
|
|
|
after = 'nvim-lsp-installer',
|
|
|
|
config = function() require 'plugins.lsp-signature' end
|
2022-05-12 21:36:31 +08:00
|
|
|
}
|
2021-09-27 11:56:17 +08:00
|
|
|
|
2021-10-25 12:10:08 +08:00
|
|
|
-- tree sitter
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'UIEnter',
|
|
|
|
config = function() require 'plugins.treesitter' end,
|
2021-09-15 15:18:15 +08:00
|
|
|
run = ':TSUpdate'
|
|
|
|
}
|
2021-09-27 11:56:17 +08:00
|
|
|
|
2021-10-25 12:10:08 +08:00
|
|
|
-- completer
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'L3MON4D3/LuaSnip', event = 'UIEnter'}
|
2022-08-07 21:00:11 +08:00
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
event = 'InsertEnter',
|
|
|
|
after = {'LuaSnip', 'cmp-nvim-lsp', 'nvim-treesitter'},
|
|
|
|
config = function() require 'plugins.cmp' end,
|
2022-08-07 21:00:11 +08:00
|
|
|
requires = {
|
|
|
|
-- local
|
|
|
|
{'hrsh7th/cmp-cmdline', after = 'nvim-cmp'},
|
|
|
|
{'hrsh7th/cmp-buffer', after = 'nvim-cmp'},
|
2022-08-07 22:57:52 +08:00
|
|
|
{'hrsh7th/cmp-path', after = 'nvim-cmp'}, {
|
|
|
|
'petertriho/cmp-git',
|
|
|
|
after = 'nvim-cmp',
|
|
|
|
config = function() require("cmp_git").setup() end
|
|
|
|
}, {'delphinus/cmp-ctags', after = 'nvim-cmp'}, -- end
|
2022-08-07 21:00:11 +08:00
|
|
|
-- lsp
|
2022-08-07 22:57:52 +08:00
|
|
|
{'hrsh7th/cmp-nvim-lsp-document-symbol', after = 'nvim-cmp'}, -- TS
|
2022-08-07 21:00:11 +08:00
|
|
|
{'ray-x/cmp-treesitter', after = 'nvim-cmp'}, -- end
|
|
|
|
-- Snip
|
|
|
|
{'saadparwaiz1/cmp_luasnip', after = {'nvim-cmp', 'LuaSnip'}}
|
|
|
|
}
|
2021-09-18 08:55:36 +08:00
|
|
|
}
|
2022-08-07 15:04:57 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- formating and editing
|
2022-08-07 21:00:11 +08:00
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'windwp/nvim-autopairs',
|
2022-08-07 21:00:11 +08:00
|
|
|
after = 'nvim-cmp',
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require('plugins.nvim-autopairs') end
|
2022-08-07 21:00:11 +08:00
|
|
|
}
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'sbdchd/neoformat', cmd = 'Neoformat'}
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'mattn/emmet-vim',
|
2022-04-03 23:22:30 +08:00
|
|
|
ft = {'html', 'htmldjango', 'css', 'markdown'},
|
2022-08-07 22:57:52 +08:00
|
|
|
setup = function() require 'plugins.emmet' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'machakann/vim-sandwich', event = 'UIEnter'}
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
2022-07-12 14:03:08 +08:00
|
|
|
'numToStr/Comment.nvim',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'UIEnter',
|
2022-07-12 14:03:08 +08:00
|
|
|
config = function() require('Comment').setup() end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2021-09-27 13:00:44 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- navigation
|
|
|
|
use {
|
|
|
|
'kyazdani42/nvim-tree.lua',
|
|
|
|
cmd = 'NvimTreeToggle',
|
2021-09-27 11:56:17 +08:00
|
|
|
requires = 'kyazdani42/nvim-web-devicons',
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require('plugins.nvim-tree') end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
|
|
|
use {
|
|
|
|
'andymass/vim-matchup',
|
|
|
|
after = 'nvim-treesitter',
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require 'plugins.matchup' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2022-05-26 10:10:36 +08:00
|
|
|
use {
|
|
|
|
'abecodes/tabout.nvim',
|
|
|
|
config = function() require('tabout').setup {} end,
|
2022-08-07 21:00:11 +08:00
|
|
|
after = {'nvim-treesitter', 'nvim-autopairs', 'nvim-cmp'} -- if a completion plugin is using tabs load it before
|
2022-05-26 10:10:36 +08:00
|
|
|
}
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope.nvim',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'UIEnter',
|
|
|
|
requires = {'nvim-lua/plenary.nvim'},
|
|
|
|
config = function() require 'plugins.telescope' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2021-11-13 15:29:17 +08:00
|
|
|
use {'preservim/tagbar', cmd = 'TagbarToggle'}
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
|
|
|
'phaazon/hop.nvim',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'UIEnter',
|
2021-09-15 15:18:15 +08:00
|
|
|
as = 'hop',
|
|
|
|
config = function()
|
|
|
|
require'hop'.setup {keys = 'etovxqpdygfblzhckisuran'}
|
|
|
|
end
|
|
|
|
}
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- eye-candy
|
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
|
|
after = {'nvim-treesitter'},
|
|
|
|
config = function() require 'plugins.indent-blankline' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
|
|
|
use {
|
|
|
|
'lewis6991/gitsigns.nvim',
|
2022-09-03 18:03:14 +08:00
|
|
|
event = 'UIEnter',
|
2021-09-15 15:18:15 +08:00
|
|
|
requires = {'nvim-lua/plenary.nvim'},
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require 'plugins.gitsigns' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
|
|
|
use {
|
|
|
|
'p00f/nvim-ts-rainbow',
|
2022-08-07 22:57:52 +08:00
|
|
|
after = 'nvim-treesitter',
|
|
|
|
config = function() require 'plugins.nvim-ts-rainbow' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2022-05-26 10:10:36 +08:00
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter-context',
|
2022-08-07 22:57:52 +08:00
|
|
|
after = 'nvim-treesitter',
|
2022-05-26 10:10:36 +08:00
|
|
|
config = function()
|
|
|
|
require'treesitter-context'.setup {
|
|
|
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
|
|
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
|
|
|
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
|
|
|
-- For all filetypes
|
|
|
|
-- Note that setting an entry here replaces all other patterns for this entry.
|
|
|
|
-- By setting the 'default' entry below, you can control which nodes you want to
|
|
|
|
-- appear in the context window.
|
|
|
|
default = {
|
|
|
|
'class', 'function', 'method', 'for', -- These won't appear in the context
|
|
|
|
'while', 'if', 'switch', 'case'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
}
|
2021-09-15 15:18:15 +08:00
|
|
|
use {
|
|
|
|
'winston0410/range-highlight.nvim',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'CmdlineEnter',
|
|
|
|
config = function() require('range-highlight').setup {} end,
|
2021-09-15 15:18:15 +08:00
|
|
|
requires = 'winston0410/cmd-parser.nvim'
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'norcalli/nvim-colorizer.lua',
|
2022-08-07 22:57:52 +08:00
|
|
|
event = 'BufEnter',
|
|
|
|
config = function() require 'plugins.nvim-colorizer' end
|
2021-09-15 15:18:15 +08:00
|
|
|
}
|
2021-09-09 19:55:32 +08:00
|
|
|
|
2021-09-15 15:18:15 +08:00
|
|
|
-- integrations
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'tpope/vim-fugitive', cmd = 'G'}
|
2022-07-12 14:03:08 +08:00
|
|
|
use {
|
2022-08-07 22:57:52 +08:00
|
|
|
'mickael-menu/zk-nvim',
|
|
|
|
requires = {'nvim-telescope/telescope.nvim'},
|
|
|
|
event = 'UIEnter',
|
|
|
|
after = {'telescope.nvim'},
|
2022-08-07 15:43:53 +08:00
|
|
|
ft = {'markdown'},
|
2022-08-07 22:57:52 +08:00
|
|
|
config = function() require 'plugins.zk' end
|
2022-07-12 14:03:08 +08:00
|
|
|
}
|
2022-06-12 21:07:03 +08:00
|
|
|
|
|
|
|
-- fixes and misc. stuff
|
2022-08-07 22:57:52 +08:00
|
|
|
use {'antoinemadec/FixCursorHold.nvim', event = 'UIEnter'}
|
2021-09-07 23:26:21 +08:00
|
|
|
end)
|
2022-05-31 11:33:28 +08:00
|
|
|
-- vim:set shiftwidth=4 tabstop=4:
|