Welcome to my customized AstroNvimV5 configuration! This setup has been optimized for an efficient and powerful development workflow. Below, you'll find all the details on how to install, configure, and use this setup, along with some helpful tips and tricks.
This configuration supports development in the following languages:
Language | AutoCompletion | Debug |
---|---|---|
Typescript | ✅ | ✅ |
Vue | ✅ | ✅ |
React | ✅ | ✅ |
Solid | ✅ | ✅ |
Angular | ✅ | ✅ |
Node | ✅ | ✅ |
Python | ✅ | ✅ |
Rust | ✅ | ✅ |
Go | ✅ | ✅ |
- TypeScript:
vtsls
. - Vue:
volar2
. - React:
vtsls
. - Angular:
angular server
. - Node:
vtsls
. - Python:
basedpyright
. - Go:
gopls
. - Rust:
rust-analyzer
. - Markdown:
markdown-preview.nvim
.
- Support full syntax hints at query time, including database tables & table columns.
- Supports a modern array of backends, including NoSQL databases:
- Big Query
- ClickHouse
- DuckDB
- Impala
- jq
- MongoDB
- MySQL
- MariaDB
- Oracle
- osquery
- PostgreSQL
- Presto
- Redis
- Snowflake
- SQL Server
- SQLite
- Your own easily implemented adapter
Neovim requires LuaJIT, so Lua 5.1 is currently the best version to use. Why Neovim uses Lua 5.1.
wget https://luarocks.github.io/luarocks/releases/luarocks-3.11.1.tar.gz
tar zxpf luarocks-3.11.1.tar.gz
cd luarocks-3.11.1
./configure --lua-version=5.1 --lua-suffix=5.1
make
sudo make install
luarocks --version
wget https://www.lua.org/ftp/lua-5.1.5.tar.gz
tar zxpf lua-5.1.5.tar.gz
cd lua-5.1.5
# For macOS
make macosx
make test
sudo make install
which lua
lua -v
Make sure the following commands are installed on your system:
npm
rustc
go
tmux
Use brew
, npm
, and pip
to install the necessary dependencies:
# Homebrew packages
brew install fzf fd lazygit ripgrep gdu bottom protobuf gnu-sed ast-grep lazydocker trash imagemagick chafa delta coreutils
# Node.js packages
npm install -g tree-sitter-cli neovim @styled/typescript-styled-plugin
# Python packages, for render-markdown.nvim
pip install pynvim pylatexenc
Backup your existing Neovim configuration and clone the customized AstroNvim setup:
mv ~/.config/nvim ~/.config/nvim.bak
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim
# Clone the customized AstroNvim configuration
git clone https://github.com/chaozwn/astronvim_with_coc_or_mason ~/.config/nvim
Here are some screenshots showcasing the workflow with kitty
, tmux
, yazi
, and AstroNvim.
- Kitty: https://github.com/chaozwn/kitty
- tmux: https://github.com/chaozwn/tmux
- yazi: https://github.com/chaozwn/yazi
When working with Rust, note that rustup
and mason
install rust-analyzer
differently, which may cause some bugs. Manual installation is recommended:
rustup component add rust-analyzer
Trigger command: <leader>tl
Trigger command: <Leader>tt
brew install bottom
Ensure Neovim dependencies are installed
# Install Neovim dependencies
npm install -g neovim
pip install pynvim
To enable image pasting in Markdown files, install the pngpaste
Python package:
brew install pngpaste
Add to .zshrc
and .bashrc
export DYLD_FALLBACK_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_FALLBACK_LIBRARY_PATH"
brew install --cask squirrel
modify squirrel.custom.yaml
patch:
show_notifications_when: always # status notification,always open(always)always close(never)
# support auto switch in vim mode
app_options:
org.vim.MacVim:
no_inline: true
vim_mode: true
uk.foon.Neovim:
no_inline: true
vim_mode: true
com.qvacua.VimR:
no_inline: true
vim_mode: true
com.ident.goneovim:
no_inline: true
vim_mode: true
com.googlecode.iterm2:
no_inline: true
vim_mode: false
com.apple.Terminal:
no_inline: true
vim_mode: false
#com.apple.iWork.Numbers:
#no_inline: true
com.alfredapp.Alfred:
ascii_mode: true
com.jetbrains.intellij:
vim_mode: true
com.jetbrains.datagrip:
vim_mode: true
com.jetbrains.WebStorm:
vim_mode: true
# Obsidian
md.obsidian:
vim_mode: true
net.kovidgoyal.kitty:
vim_mode: true
# AntDraw in Edge
com.microsoft.edgemac.app.jndbnbljngolcchhjbajncidekccnlck:
no_inline: true
# AntDraw in Chrome
com.google.Chrome.app.jndbnbljngolcchhjbajncidekccnlck:
no_inline: true
nvim -u /Users/jayce.zhao/.config/nvim/mini_astronvim.lua .
Here are the general key mappings for this configuration:
Action | Keybinding |
---|---|
Leader key | Space |
Resize up | Ctrl + Up |
Resize down | Ctrl + Down |
Resize left | Ctrl + Left |
Resize right | Ctrl + Right |
Move to upper window | Ctrl + k |
Move to lower window | Ctrl + j |
Move to left window | Ctrl + h |
Move to right window | Ctrl + l |
Force write | Ctrl + s |
Force quit | Ctrl + q |
New file | Leader + n |
Close buffer | Leader + c |
Next tab (real Vim tab) | ]t |
Previous tab (real Vim tab) | [t |
Toggle comment | Leader + / |
Horizontal split | \ |
Vertical split | | |
You can use vim.lsp.buf.hover()
to display hover information about the symbol under the cursor in a floating window. Calling the function twice will jump into the floating window.
- Keybinding:
KK
To quickly set a DAP (Debug Adapter Protocol) breakpoint, use <Ctrl-LeftClick>
on the line number.
This configuration supports Neovim version >= 0.10
.
This configuration is open-source and available under the MIT License.
Feel free to explore, customize, and enjoy this powerful Neovim setup! If you have any questions or encounter issues, don't hesitate to reach out.
Happy coding! 🚀