Getting Started
⚡ Requirements
- Nerd Fonts
- Neovim 0.8 (Not including nightly)
- A clipboard tool is necessary for the integration with the system clipboard (see
:help clipboard-tool
for supported solutions) - Terminal with true color support (for the default theme, otherwise it is dependent on the theme you are using)
- Optional Requirements:
When using default theme: For MacOS, the default terminal does not have true color support. You will need to use iTerm2 or another terminal emulator that has true color support.
🛠️ Installation
- Linux/Mac OS (Unix)
- Windows (PowerShell)
- Docker
Make a backup of your current nvim folder
mv ~/.config/nvim ~/.config/nvim.bak
Clean old plugins (Optional but recommended)
mv ~/.local/share/nvim/site ~/.local/share/nvim/site.bak
Clone the repository
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim +PackerSync
Make a backup of your current nvim folder
Move-Item $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.bak
Clean old plugins (Optional but recommended)
Move-Item $env:LOCALAPPDATA\nvim-data $env:LOCALAPPDATA\nvim-data.bak
Clone the repository
git clone https://github.com/AstroNvim/AstroNvim $env:LOCALAPPDATA\nvim
nvim +PackerSync
If you want to try AstroNvim before installing you can user the following Docker command to open a test instance without touching your current Neovim configuration. This also allows you to use :TSInstall
and :LspInstall
to load and evaluate language servers and treesitter parsers as well.
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git nodejs npm lazygit ncdu htop python3 neovim ripgrep alpine-sdk --update
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
# Uncomment the line below and replace the link with your user config repo to load a user config
# git clone https://github.com/username/AstroNvim_user ~/.config/nvim/lua/user
nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync"
nvim
'
📦 Setup
Install LSP
Enter :LspInstall
followed by the name of the server you want to install
Example:
:LspInstall pyright
Install language parser
Enter :TSInstall
followed by the name of the language you want to install
Example:
:TSInstall python
Manage plugins
Run :PackerClean
to remove any disabled or unused plugins
Run :PackerSync
to update and clean plugins
Update AstroNvim
Run :AstroUpdate
to get the latest updates from the repository
Reload AstroNvim (EXPERIMENTAL)
Run :AstroReload
to reload the AstroNvim configuration and any new user configuration changes without restarting. This is currently an experimental feature and may lead to instability until the next restart. We have noticed that in particular some language servers do not correctly unattach and reattach after the reloading and cause multiple LSP clients to attach to the same buffer.
✨ Features
- File explorer with Neo-tree
- Autocompletion with Cmp
- Git integration with Gitsigns
- Statusline with Heirline
- Terminal with Toggleterm
- Fuzzy finding with Telescope
- Syntax highlighting with Treesitter
- Formatting and linting with Null-ls
- Language Server Protocol with Native LSP
⚙️ Configuration
To begin making custom user configurations you must create a user/
folder. The provided example can be created with (please note the trailing slashes after the directory names)
cp -r ~/.config/nvim/lua/user_example/ ~/.config/nvim/lua/user/
The provided example
user_example
contains an init.lua
file which can be used for all user configuration. After
running the cp
command above this file can be found in
~/.config/nvim/lua/user/init.lua
.