Search code examples
luafontslazy-evaluationneovim

How can I fix missing icons on Neovim Lualine plugin?


I am setting up my Neovim configuration using Lazy.nvim to install plugins. Among these is the lualine.nvim plugin. Several of its icons do not render properly, instead displaying unknown characters as if I were using an unpatched font. Broken error icons displayed in nvim I've installed and configured the Lualine plugin and the Nvim Web Dev Icons plugin as its dependency. Along with this, I've installed and set the Agave Nerd Font as my terminal's font. Despite all this, I am still missing icons. Some of them show up perfectly fine, such as the file icons in the Nvim Tree, the Python and Windows logo in the bottom right corner, and the warning and error icons on the left margin. However, the icon preceding diagnostic messages within the buffer and the error icons on the bottom left side of the Lualine just load as an unknown character. I've tried looking through the Lualine documentation and configuring things differently, but no luck. I've also uninstalled and reinstalled all related plugins and installed a dozen different nerd fonts to no avail. It may also be worth noting that one of the characters in the Mason.nvim UI is also missing (the "X" symbol to indicate uninstalled), while the others render fine.

Edit, for posterity: The solution was far simpler than I was making it. The plugins were installed and configured correctly, and my nerd fonts were working as intended. The issue was the terminal. I was using a command prompt to run Neovim, which cannot display special characters in nerd fonts. After switching to Windows Terminal, everything works perfectly.


Solution

  • The solution was far simpler than I was making it. The plugins were installed and configured correctly, and my nerd fonts were working as intended. The issue was the terminal. I was using a command prompt to run Neovim, which cannot display special characters in nerd fonts. After switching to Windows Terminal, everything works perfectly.