Nerd font

To install a Nerd Font in Termux for use with Neovim, follow these steps:

  1. Download a Nerd Font: Download a Nerd Font from the official Nerd Fonts repository. For example, let's use Hack Nerd Font.
mkdir -p ~/.termux/font
cd ~/.termux/font
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip
  1. Unzip the Font: Unzip the downloaded font archive.
unzip Hack.zip
  1. Move the Font Files: Move the desired font files to the .termux directory.
mv *.ttf ~/.termux/font/
  1. Configure Termux to Use the Font: Edit the Termux properties file to use the new font.
echo "font: ~/.termux/font/Hack Regular Nerd Font Complete.ttf" >> ~/.termux/termux.properties
  1. Reload Termux Settings: Restart Termux or reload the settings for the changes to take effect.
termux-reload-settings

  1. Install Neovim: If you haven't already installed Neovim, you can do so using the package manager.
pkg install neovim
  1. Configure Neovim: Ensure your Neovim configuration is set up to use the Nerd Font icons. You can edit your init.vim or init.lua configuration file.
mkdir -p ~/.config/nvim
nano ~/.config/nvim/init.vim

Add the necessary plugins and settings that make use of Nerd Font icons. For example, with the popular vim-devicons plugin:

call plug#begin('~/.vim/plugged')
Plug 'ryanoasis/vim-devicons'
call plug#end()
  1. Install the Plugins: Open Neovim and install the plugins.
nvim
:PlugInstall

Now, you should have Neovim set up with Nerd Font icons on Termux.