123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- local fn = vim.fn
- local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
- local paccker_bootstrap
- if fn.empty(fn.glob(install_path)) > 0 then
- vim.notify("正在安装Pakcer.nvim,请稍后...")
- paccker_bootstrap = fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim",
-
- install_path })
-
- local rtp_addition = vim.fn.stdpath("data") .. "/site/pack/*/start/*"
- if not string.find(vim.o.runtimepath, rtp_addition) then
- vim.o.runtimepath = rtp_addition .. "," .. vim.o.runtimepath
- end
- vim.notify("Pakcer.nvim 安装完毕")
- end
- local status_ok, packer = pcall(require, "packer")
- if not status_ok then
- vim.notify("没有安装 packer.nvim")
- return
- end
- packer.startup({
- function(use)
-
- use 'wbthomason/packer.nvim'
-
- use {
- 'nvim-lualine/lualine.nvim',
- requires = {
- 'nvim-tree/nvim-web-devicons',
- opt = true
- }
- }
- use('nvim-tree/nvim-web-devicons')
-
- use("folke/tokyonight.nvim")
-
- use({
- "kyazdani42/nvim-tree.lua",
- requires = "kyazdani42/nvim-web-devicons"
- })
-
- use {
- 'nvim-telescope/telescope.nvim',
- requires = { "nvim-lua/plenary.nvim" }
- }
-
- use {
- 'glepnir/dashboard-nvim',
- requires = { 'nvim-tree/nvim-web-devicons' }
- }
- use 'voldikss/vim-floaterm'
-
- use("ahmedkhalf/project.nvim")
-
- use {
- 'nvim-treesitter/nvim-treesitter',
- run = ':TSUpdate'
- }
-
- use {
- 'neoclide/coc.nvim',
- branch = 'release'
- }
-
- use({ "neovim/nvim-lspconfig" })
-
-
-
-
-
-
-
-
-
- use("rafamadriz/friendly-snippets")
-
- use {
- "windwp/nvim-autopairs",
- config = function()
- require("nvim-autopairs").setup {}
- end
- }
-
- use('jose-elias-alvarez/null-ls.nvim')
- use('MunifTanjim/prettier.nvim')
- use {
- 'numToStr/Comment.nvim',
- config = function()
- require('Comment').setup()
- end
- }
- end,
- config = {
-
- max_jobs = 16,
-
- git = {
-
-
-
-
- },
- display = {
- open_fn = function()
- return require("packer.util").float({
- border = "single"
- })
- end
- }
- }
- })
- pcall(vim.cmd, [[
- augroup packer_user_config
- autocmd!
- autocmd BufWritePost plugins.lua source <afile> | PackerSync
- augroup end
- ]])
|