12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- 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("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',
- event = 'VimEnter',
- requires = {'nvim-tree/nvim-web-devicons'}
- }
-
- use("ahmedkhalf/project.nvim")
-
- use({
- "nvim-treesitter/nvim-treesitter",
- run = ":TSUpdate"
- })
- 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
- ]])
|