Skip to content

Q3rkses/nvimconf

Repository files navigation

template for getting started with AstroNvim

⚡ Requirements (copied from the official AstroNvim github)

Dependencies

I recommend installing tree-sitter-cli through cargo and installing rust through rustup if you intend to use rust again later, this is simply done by

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install tree-sitter-cli

and then the other apt dependencies,

sudo apt install ripgrep fzf npm python3-pip python3.14-venv python3-full gdu imagemagick ghostscript fd-find wl-clipboard -y

To use astrovim need nvim >= 0.10

If you installed nvim through apt it is likely an old version, therefore we want to delete it first.

sudo apt remove neovim -y  # if installed via apt
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo mv /opt/nvim-linux-x86_64 /opt/nvim
echo 'export PATH="$PATH:/opt/nvim/bin"' >> ~/.bashrc
source ~/.bashrc
nvim --version

A Nerd Font

Here i show how to install JetBrainsMono but you can pick any you like:

mkdir -p ~/.local/share/fonts && cd ~/.local/share/fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
unzip -o JetBrainsMono.zip -d JetBrainsMono && rm JetBrainsMono.zip && fc-cache -f

My Mason Installs

:MasonInstall clangd clang-format basedpyright black ruff lua-language-server stylua shfmt jq yamlfmt rust-analyzer

Recommended terminal emulator (skip this step if you have your own emulator)

I recommend using kitty as the terminal emulator and have added a folder called nvim_kitty_config, which one can easily simlink to the correct position in .config/kitty. https://sw.kovidgoyal.net/kitty/

First backup your own kitty files

mv ~/.config/kitty/kitty.conf ~/.config/kitty/kitty.conf.bak 2>/dev/null
mv ~/.config/kitty/theme.conf ~/.config/kitty/theme.conf.bak 2>/dev/null
ln -s ~/.config/nvim/kitty_nvim_conf/kitty.conf ~/.config/kitty/kitty.conf
ln -s ~/.config/nvim/kitty_nvim_conf/theme.conf ~/.config/kitty/theme.conf

Useful aliases

in ~/.bashrc or ~/.zshrc or ~/.bashaliases

code() { nvim "$@"; }

For automatic code completion

# Bash completions
if ! shopt -oq posix; then
	if [ -f /usr/share/bash-completion/bash_completion ]; then
		. /usr/share/bash-completion/bash_completion
	elif [ -f /etc/bash_completion ]; then
		. /etc/bash_completion
	fi
fi
[ -f ~/.local/share/bash-completion/completions/rustup ]

For fuzzy reverse-search using fzf

# fzf (Ctrl+R fuzzy history search)
[ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && source /usr/share/doc/fzf/examples/key-bindings.bash
export FZF_DEFAULT_COMMAND='rg --files --hidden --follow --glob "!.git/*"'

Set nvim as the default text editor

For git

git config --global core.editor "nvim"

For systemwide

sudo update-alternatives --install /usr/bin/editor editor $(which nvim) 100
sudo update-alternatives --config editor

Start Neovim

nvim

About

Neovim config, mostly vibecoded and heavily inspired by other nvim configs from various sources.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors