The Releases page provides an AppImage that runs on most Linux systems. No installation is needed, just download nvim.appimage and run it. (It might not work if your Linux distribution is more than 4 years old.)
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: " /home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info
替换默认的 vim (也可以不加)
nvim ~/.bashrc,添加别名:
1 2 3
alias vim='nvim' alias vi='nvim' alias v='nvim'
配置文件
nvim配置文件入口:~/.config/nvim/init.lua,如果没有可以新建
init.lua
1
require('basic')
新建~/.config/nvim/lua/basic.lua
vim lua/basic.lua
更新插件
如果出现如下报错,是因为git clone时,github连不上:
尝试更改plugin.lua的测试代码
1 2 3 4
returnrequire('packer').startup(function() use 'wbthomason/packer.nvim' end)
尝试手动安装插件:
1 2
cd ~/.local/share/nvim/site/pack/packer/start git clone --depth 1 https://github.com/folke/tokyonight.nvim.git
检查packer.nvim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0then packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end
returnrequire('packer').startup(function(use) -- My plugins here -- use 'foo1/bar1.nvim' -- use 'foo2/bar2.nvim'
-- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins if packer_bootstrap then require('packer').sync() end end)