AstroNvim Setup in Fedora 39

Transform your Neovim with AstroNvim: Easy setup guide for Nerdfonts, Python, and essential dev tools.

AstroNvim Setup in Fedora 39
Credit: Author

Website: https://astronvim.com/

Prerequisites

Install Nerdfonts

  1. Download any font you like here: https://www.nerdfonts.com/font-downloads
  2. Put the extracted files to /usr/.local/share/fonts if you want them installed only by your user or /usr/share/fonts if you want them installed globally (you need sudo right).
  3. Rebuild the font cache: fc-cache -f -v

Install Neovim

Website: https://neovim.io/

sudo dnf install -y neovim python3-neovim

When you install Neovim, it works with the command nvim not to clash with Vim as vim. So we need to create an alias for nvim if you would like to open Neovim with vim command. I assume that you installed zsh as the default shell:

sudo nvim ~/.zshrc

Add the following line:

alias vim=nvim

In some consoles (it happened to me with Konsole in KDE), aliases don’t work with sudo (https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Aliases). As a result, I also suggest to add the following alias:

alias sudo='sudo '

Install Nodejs

Website: https://nodejs.org/en

I am not a Nodejs developer, so I don’t need advanced installation, but I need it for several packages. As a result, I will install directly from repositories. If you are a Nodejs developer and need more advanced installation, you most probably don’t need me to tell you how to install :)

sudo dnf install nodejs

When you finish installation, you can check the version:

node -v

Tree-sitter CLI

Github: https://github.com/tree-sitter/tree-sitter/blob/master/cli/README.md

Based on official documentation, it is required for: This is only necessary if you want to use auto_install feature with Treesitter, which makes sense to me:

npm install tree-sitter-cli

If you need more additional features, I suggest you check the dependencies: https://github.com/tree-sitter/tree-sitter/blob/master/cli/README.md#dependencies

Ripgrep

Github: https://github.com/BurntSushi/ripgrep

sudo dnf install ripgrep

Lazygit

Github: https://github.com/jesseduffield/lazygit

sudo dnf copr enable atim/lazygit -y
sudo dnf install lazygit

go DiskUsage()

Github: https://github.com/dundee/gdu

curl -L https://github.com/dundee/gdu/releases/latest/download/gdu_linux_amd64.tgz | tar xz
chmod +x gdu_linux_amd64
sudo mv gdu_linux_amd64 /usr/bin/gdu

I don’t like the default styling, so I always run it in grayscale mode with the current command.

echo "no-color: true" >> ~/.gdu.yaml

Bottom

Github: https://github.com/ClementTsang/bottom

curl -LO https://github.com/ClementTsang/bottom/releases/download/0.9.6/bottom-0.9.6-1.x86_64.rpm
sudo rpm -i bottom-0.9.6-1.x86_64.rpm

Showtime

First, let’s backup the current nvim configuration (it is always better to backup no matter what you are installing):

mv ~/.config/nvim ~/.config/nvim.bak

If there is nothing to delete, it is OK.

Let’s clean the nvim folders, which is an optional step but is better to do to avoid clashes:

mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

Now, getting the code and starting the show:

git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvim

It will install a good amount of things, and voila!

Credit: Author

Python Setup

I will keep it short with the ultimate necessary packages. If you would like to know more on this topic, I suggest you watch this video:

Subscribe to Can Artuc

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe