Skip to main content

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

LSP Config:

: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

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:

KeyCommand
sSearch character
fFind character forwards
FFind character backwards
tTil character forwards
TTil character backwards