nvim/lua/core/plug.lua

58 lines
1.1 KiB
Lua
Raw Normal View History

2023-01-28 16:20:45 +08:00
local G = require('G')
2023-01-28 15:11:37 +08:00
local ensure_packer = function()
2023-01-28 16:20:45 +08:00
local fn = G.fn
2023-01-28 15:11:37 +08:00
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
2023-01-28 16:20:45 +08:00
G.cmd [[packadd packer.nvim]]
2023-02-18 10:07:14 +08:00
G.cmd [[PackerSync]]
2023-01-28 15:11:37 +08:00
return true
end
return false
2023-01-19 18:14:43 +08:00
end
2023-01-22 17:20:38 +08:00
2023-01-28 15:11:37 +08:00
local packer_bootstrap = ensure_packer()
2023-02-05 04:41:06 +08:00
2023-01-28 15:11:37 +08:00
return require('packer').startup(function(use)
2023-01-19 18:14:43 +08:00
2023-01-28 16:20:45 +08:00
-- 防止被自己clean
use 'wbthomason/packer.nvim'
2023-01-19 18:14:43 +08:00
-- 主题插件
2023-01-28 15:11:37 +08:00
use 'nvim-lualine/lualine.nvim'
use 'morhetz/gruvbox'
2023-02-08 17:24:53 +08:00
use 'yaocccc/nvim-hlchunk'
2023-01-19 18:14:43 +08:00
2023-02-08 17:24:53 +08:00
-- lsp 补全以及语法高亮
2023-01-28 15:11:37 +08:00
use {'neoclide/coc.nvim', branch = 'release'}
2023-02-08 17:24:53 +08:00
use 'nvim-treesitter/nvim-treesitter'
2023-01-19 18:14:43 +08:00
-- surround 和 wildfire 配合有神奇的效果
2023-01-28 15:11:37 +08:00
use 'tpope/vim-surround'
use 'gcmt/wildfire.vim'
2023-01-28 16:20:45 +08:00
2023-01-19 18:14:43 +08:00
-- 格式整理
2023-01-28 15:11:37 +08:00
use 'junegunn/vim-easy-align'
2023-01-28 16:20:45 +08:00
use 'tpope/vim-commentary'
2023-01-19 18:14:43 +08:00
--颜色识别
2023-01-28 15:11:37 +08:00
use 'lilydjwg/colorizer'
2023-01-19 18:14:43 +08:00
--markdown
2023-01-28 15:11:37 +08:00
use 'iamcco/markdown-preview.nvim'
2023-01-19 20:33:35 +08:00
2023-01-28 16:20:45 +08:00
-- 文件搜索
use {'junegunn/fzf'}
2023-02-10 17:24:19 +08:00
-- 多光标
use 'terryma/vim-multiple-cursors'
2023-02-11 13:36:26 +08:00
2023-01-28 15:11:37 +08:00
end)
2023-01-19 18:14:43 +08:00