-- This file can be loaded by calling `lua require('plugins')` from your init.vim -- Only required if you have packer configured as `opt` -- vim.cmd [[packadd packer.nvim]] local execute = vim.api.nvim_command local fn = vim.fn local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) execute 'packadd packer.nvim' end vim.api.nvim_create_autocmd("BufWritePost", { pattern = "plugins.lua", command = "source | PackerCompile", }) return require('packer').startup(function() -- Packer can manage itself -- 包管理 use 'wbthomason/packer.nvim' use "williamboman/mason.nvim" use "williamboman/mason-lspconfig.nvim" -- LSP 代码补全插件 use 'neovim/nvim-lspconfig' use 'windwp/nvim-autopairs' use 'windwp/nvim-ts-autotag' use 'hrsh7th/nvim-cmp' use 'hrsh7th/cmp-path' use 'hrsh7th/cmp-omni' use 'hrsh7th/cmp-buffer' use 'hrsh7th/cmp-nvim-lsp' use 'saadparwaiz1/cmp_luasnip' use 'L3MON4D3/LuaSnip' -- 格式化 use 'mhartington/formatter.nvim' -- 界面插件 use { "ellisonleao/gruvbox.nvim" } -- need to install nerd font use 'kyazdani42/nvim-web-devicons' use 'kyazdani42/nvim-tree.lua' use 'akinsho/bufferline.nvim' use 'nvim-lualine/lualine.nvim' use 'f-person/git-blame.nvim' use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } -- utils -- 注释插件 use 'numToStr/Comment.nvim' -- 模糊查找工具 文件跳转 use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/plenary.nvim' } } } -- vim 内打开终端工具 use { "akinsho/toggleterm.nvim" } -- 自动保存 use "Pocco81/AutoSave.nvim" -- git状态 use 'lewis6991/gitsigns.nvim' -- 新文件模板 use 'aperezdc/vim-template' -- 缩进标记 use "lukas-reineke/indent-blankline.nvim" -- 显示颜色 如#0f0 use "norcalli/nvim-colorizer.lua" -- git 查看merge信息 -- ~/.gitconfig -- [merge] -- conflictStyle = diff3 use "samoshkin/vim-mergetool" -- latex 工具支持 use 'lervag/vimtex' end)