2023-04-13 10:54:07 +08:00
|
|
|
return require("packer").startup(function(use)
|
|
|
|
use({ "wbthomason/packer.nvim" })
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- core UI
|
|
|
|
use({
|
2023-04-13 10:54:07 +08:00
|
|
|
"ellisonleao/gruvbox.nvim",
|
2022-09-16 17:36:17 +08:00
|
|
|
config = function()
|
2023-04-13 10:54:07 +08:00
|
|
|
vim.cmd("colorscheme gruvbox")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({ "nvim-tree/nvim-web-devicons" })
|
|
|
|
use({
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
after = { "nvim-web-devicons" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.statusline")
|
|
|
|
end,
|
|
|
|
})
|
2022-09-16 17:36:17 +08:00
|
|
|
-- use {
|
|
|
|
-- 'romgrk/barbar.nvim',
|
|
|
|
-- requires = {'kyazdani42/nvim-web-devicons'},
|
|
|
|
-- event = 'BufAdd',
|
|
|
|
-- after = {'nvim-web-devicons'},
|
|
|
|
-- config = function() require 'plugins.barbar' end
|
|
|
|
-- }
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- lsp stuff
|
2023-04-13 10:54:07 +08:00
|
|
|
use({
|
|
|
|
"neovim/nvim-lspconfig",
|
2023-03-09 17:25:09 +08:00
|
|
|
after = { "mason-lspconfig.nvim", "null-ls.nvim" },
|
2023-04-13 10:54:07 +08:00
|
|
|
config = function()
|
|
|
|
require("plugins.lsp")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({ "williamboman/mason-lspconfig.nvim", after = "mason.nvim" })
|
|
|
|
use({ "hrsh7th/cmp-nvim-lsp", after = "nvim-lspconfig" })
|
|
|
|
use({
|
|
|
|
"ray-x/lsp_signature.nvim",
|
|
|
|
after = {"nvim-cmp"},
|
|
|
|
config = function()
|
|
|
|
require("plugins.lsp-signature")
|
|
|
|
end,
|
|
|
|
})
|
2021-09-27 11:56:17 +08:00
|
|
|
|
2023-04-13 10:54:07 +08:00
|
|
|
-- tree sitter modules and tree sitter
|
|
|
|
use({
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"HiPhish/nvim-ts-rainbow2",
|
|
|
|
after = { "nvim-treesitter" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.treesitter")
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
2023-05-11 20:43:31 +08:00
|
|
|
event = "UIEnter",
|
2023-04-13 10:54:07 +08:00
|
|
|
run = ":TSUpdate",
|
|
|
|
})
|
2021-09-27 11:56:17 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- completer
|
2023-04-13 10:54:07 +08:00
|
|
|
use({
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
event = "UIEnter",
|
|
|
|
requires = { "rafamadriz/friendly-snippets" },
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"hrsh7th/nvim-cmp",
|
|
|
|
event = "InsertEnter",
|
|
|
|
after = { "LuaSnip", "cmp-nvim-lsp", "nvim-treesitter" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.cmp")
|
|
|
|
end,
|
2022-09-16 17:36:17 +08:00
|
|
|
requires = {
|
|
|
|
-- local
|
2023-04-13 10:54:07 +08:00
|
|
|
{ "hrsh7th/cmp-cmdline", after = "nvim-cmp" },
|
|
|
|
{ "hrsh7th/cmp-buffer", after = "nvim-cmp" },
|
|
|
|
{ "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-09-16 17:36:17 +08:00
|
|
|
-- lsp
|
2023-04-13 10:54:07 +08:00
|
|
|
{ "hrsh7th/cmp-nvim-lsp-document-symbol", after = "nvim-cmp" }, -- TS
|
|
|
|
{ "ray-x/cmp-treesitter", after = "nvim-cmp" }, -- end
|
2022-09-16 17:36:17 +08:00
|
|
|
-- Snip
|
2023-04-13 10:54:07 +08:00
|
|
|
{ "saadparwaiz1/cmp_luasnip", after = { "nvim-cmp", "LuaSnip" } },
|
|
|
|
},
|
|
|
|
})
|
2022-08-07 15:04:57 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- formating and editing
|
2023-04-13 10:54:07 +08:00
|
|
|
use({ "williamboman/mason.nvim", event = "BufEnter" })
|
|
|
|
use({
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
after = "nvim-cmp",
|
|
|
|
config = function()
|
|
|
|
require("plugins.nvim-autopairs")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({
|
2022-09-16 17:36:17 +08:00
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
2023-03-09 17:25:09 +08:00
|
|
|
requires = { "nvim-lua/plenary.nvim" },
|
2023-04-13 10:54:07 +08:00
|
|
|
event = "BufEnter",
|
|
|
|
})
|
|
|
|
use({
|
2023-03-09 17:25:09 +08:00
|
|
|
"jay-babu/mason-null-ls.nvim",
|
2022-09-16 17:36:17 +08:00
|
|
|
config = function()
|
2023-04-13 10:54:07 +08:00
|
|
|
require("plugins.null-ls")
|
|
|
|
end,
|
|
|
|
after = { "mason.nvim", "null-ls.nvim" },
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"mattn/emmet-vim",
|
|
|
|
ft = { "html", "htmldjango", "css", "markdown" },
|
|
|
|
setup = function()
|
|
|
|
require("plugins.emmet")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({ "machakann/vim-sandwich", event = "UIEnter" })
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2023-04-13 10:54:07 +08:00
|
|
|
use({
|
|
|
|
"numToStr/Comment.nvim",
|
|
|
|
event = "UIEnter",
|
|
|
|
config = function()
|
|
|
|
require("Comment").setup()
|
|
|
|
end,
|
|
|
|
})
|
2021-09-27 13:00:44 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- navigation
|
2023-04-13 10:54:07 +08:00
|
|
|
use({
|
|
|
|
"andymass/vim-matchup",
|
|
|
|
after = "nvim-treesitter",
|
2022-09-16 17:36:17 +08:00
|
|
|
config = function()
|
2023-04-13 10:54:07 +08:00
|
|
|
require("plugins.matchup")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
event = "UIEnter",
|
|
|
|
requires = { "nvim-lua/plenary.nvim" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.telescope")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({ "preservim/tagbar", cmd = "TagbarToggle" })
|
|
|
|
use({
|
|
|
|
"phaazon/hop.nvim",
|
|
|
|
event = "UIEnter",
|
|
|
|
as = "hop",
|
|
|
|
config = function()
|
|
|
|
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
|
|
|
|
end,
|
|
|
|
})
|
2021-09-07 23:26:21 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- eye-candy
|
2023-04-13 10:54:07 +08:00
|
|
|
use({
|
|
|
|
"eandrju/cellular-automaton.nvim",
|
|
|
|
cmd = "CellularAutomaton",
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
event = "UIEnter",
|
|
|
|
requires = { "nvim-lua/plenary.nvim" },
|
2022-09-16 17:36:17 +08:00
|
|
|
config = function()
|
2023-04-13 10:54:07 +08:00
|
|
|
require("plugins.gitsigns")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
|
|
after = "nvim-treesitter",
|
|
|
|
config = function()
|
|
|
|
require("treesitter-context").setup({
|
2022-09-16 17:36:17 +08:00
|
|
|
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.
|
2023-03-09 16:26:45 +08:00
|
|
|
patterns = {
|
|
|
|
-- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
2022-09-16 17:36:17 +08:00
|
|
|
-- 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 = {
|
2023-04-13 10:54:07 +08:00
|
|
|
"class",
|
|
|
|
"function",
|
|
|
|
"method",
|
|
|
|
"for", -- These won't appear in the context
|
|
|
|
"while",
|
|
|
|
"if",
|
|
|
|
"switch",
|
|
|
|
"case",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"winston0410/range-highlight.nvim",
|
|
|
|
event = "CmdlineEnter",
|
|
|
|
config = function()
|
|
|
|
require("range-highlight").setup({})
|
|
|
|
end,
|
|
|
|
requires = "winston0410/cmd-parser.nvim",
|
|
|
|
})
|
|
|
|
use({
|
|
|
|
"norcalli/nvim-colorizer.lua",
|
|
|
|
event = "BufEnter",
|
|
|
|
config = function()
|
|
|
|
require("plugins.nvim-colorizer")
|
|
|
|
end,
|
|
|
|
})
|
2021-09-09 19:55:32 +08:00
|
|
|
|
2022-09-16 17:36:17 +08:00
|
|
|
-- integrations
|
2023-04-13 10:54:07 +08:00
|
|
|
use({ "tpope/vim-fugitive", cmd = "G" })
|
2021-09-07 23:26:21 +08:00
|
|
|
end)
|
2022-05-31 11:33:28 +08:00
|
|
|
-- vim:set shiftwidth=4 tabstop=4:
|