Neovim
sudo pacman -S neovim
brew install neovim
winget install Neovim.Neovim
LazyVim
LazyVim setup:
mv ~/.config/nvim{,.bak}
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}
git clone --depth=1 https://github.com/LazyVim/starter ~/.config/nvim
AstroNvim
AstroNvim setup:
mv ~/.config/nvim{,.bak}
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}
git clone --depth=1 https://github.com/AstroNvim/template ~/.config/nvim
Extras Plugins
Config LazyVim extras plugins ~/.config/nvim/lazyvim.json,
installed in ~/.local/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/extras.
Community Plugins
AstroNvim community plugins (~/.config/nvim/lua/community.lua):
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.colorscheme.catppuccin" },
{ import = "astrocommunity.completion.copilot-lua-cmp" },
-- import/override with your plugins folder
}
See plugins list on Astro Community.
Language Server
:LspInstall typescript
Logs
:Inspect 显示 highlight group, :messages 显示日志信息.
ESLint
Config ESLint LSP server
~/.config/nvim/lua/plugins/lsp.lua.
Spell
Grammar
:LspInstall harper_ls Grammarly LSP with <Leader>ca LSP code action.
Option
Enable spell options
~/.config/nvim/lua/config/options.lua:
vim.opt.spelllang = { "en", "cjk" }
vim.opt.spell = true
vim.opt.spelloptions = "camel"
Dictionary
zg添加到字典 (~/.config/nvim/spell/en.utf-8.add或~/.vim/spell/en.utf-8.add).- Rebuild dictionary with
mkspell!~/.config/nvim/lua/config/keymaps.lua.
Markdown
关闭 render ~/.config/nvim/lua/plugins/markdown.lua
和 conceal ~/.config/nvim/lua/config/autocmds.lua.
Clipboard
sudo pacman -S wl-clipboard
:checkhealth vim.provider
flash.nvim
flash.nvim key bindings:
| Key | Command |
|---|---|
s | Search character |
f | Find character forwards |
F | Find character backwards |
t | Til character forwards |
T | Til character backwards |