Skip to content
On this page

packer.nvim


标签:vim/plugin  

wbthomason/packer.nvim: A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config (github.com)

  1. 从 github 安装 packer.nvim 的文件
bash
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim
  1. 创建编辑 ~/.config/nvim/lua/plugins.lua :
bash
mkdir -p ~/.config/nvim/lua
nvim ~/.config/nvim/lua/plugins.lua
lua
-- 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](/packadd packer.nvim)

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'
end)

更多的用法可以参考上面官方地址

  1. ~/.config/nvim/init.vim 文件中引入 :
lua
lua require('plugins')
  1. 重新打开 nvim, 输入 :PackageInstall 安装

插件安装位置

  • ~/.local/share/nvim/

Last updated: