Setup
Download
Configure
Install lua
:
sudo apt update
sudo apt install lua5.4 liblua5.4-dev
Install luarocks:
wget https://luarocks.org/releases/luarocks-3.12.2.tar.gz
tar zxpf luarocks-3.12.2.tar.gz
cd luarocks-3.12.2
./configure && make && sudo make install
sudo luarocks install luasocket
# check luarocks installation
lua
> require "socket"
Download configuration:
mkdir -p ~/.config && cd ~/.config
git clone git@github.com:gloriallluo/nvim.git
Run :checkhealth lazy
in nvim to verify if Lazy
is installed correctly.
如果 lazy.nvim 安装不成功,可以先注释掉 init.lua
中依赖插件的部分,重新启动 Neovim 一次。
LSPs
clangd
sudo apt-get update
sudo apt-get install clangd-12
记录一些好用的插件
插件管理
LSP相关 / 语法支持 / 补全
- nvim-lspconfig
- 补全插件 nvim-cmp
- 补全源 cmp-nvim-lsp, cmp-buffer, cmp-path, cmp-cmdline
- 更全面的代码解析插件 treesitter
功能类
- 文件树 nvim-tree
- 终端 toggleterm
- 顶部状态栏 bufferline
- 项目内搜索 telescope