[New]
本配置目前完全适用Unix-like操作系统,部分插件在windows上可能不可用。
1、MacOS:brew
2、Linux:build from source
sudo apt update
sudo apt upgrade -y
sudo apt install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen
cd ~/tmp
git clone https://github.com/neovim/neovim.git
cd neovim
#安装0.11.x
git checkout release-0.11
# 显示build细节
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
nvim --version3、Windows:github release下载msi安装。
使用配置的前置条件
- neovim版本需要 >= 0.11
- api:
vim.keymap.set,vim.api.nvim_create_augroup,vim.api.nvim_create_autocmd: neovim >= 0.7 - lazy.nvim: neovim >= 0.8
- lualine.nvim: neovim >= 0.7
- telescope.nvim: neovim >= 0.9
- nvim-treesitter.nvim: neovim >= 0.10
- nvim-lspconfig.nvim: neovim >= 0.10
- mason-lspconfig: neovim >= 0.11
- api:
- 外部软件
- lua
- lazygit
- telescope.nvim部分功能需要ripgrep,如livegrep、grep string。(ripgrep支持windows)
- nvim-treesitter.nvim需要tar、curl(或者git),以及C编辑器与libstdc++。(windows用户看这)
- Mason需要npm、python3
- (可选)lazy.nvim插件部分功能需要luarocks
- 字体
快速开始
- 将仓库clone到下列路径
- Linux/MacOS:
~/.config/nvim - Win:
~/AppData/Local/nvim
- Linux/MacOS:
- 打开nvim
lsp支持
nvim-lspconfig.nvim:lsp配置支持mason.nvim, mason-lspconfig.nvim:快速安装不同语言lsp服务端nvim/lua/plugin-config/mason.lua:指定要安装的lsp服务端,会自动安装
nvim/lua/lsp/:lsp关于特定语言(如lua)的配置(需要于init.lua中引用)
特别说明:nvim/ftplugin/*.lua 特定文件类型定义局部缓冲区设置,此处配置被执行的时间晚,neovim检测到文件类型后才会加载,不能用于加载指定语言的lsp接口(treesitter高亮需要lsp接口,且其加载时间早)。
dap支持
[Old] Required environment
- python3
- node.js
Steps
- Git clone this repo in these paths.
- Win: ~/AppData/Local/nvim
- Linux/MacOS: ~/.config/nvim
- Open neovim, execute command:
PlugInstall. - Execute command
CocUpdateto install coc plugins, if fail to install some plugins, you can install them manually by executing commandCocInstall <plugin-name>.