nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.93k stars 462 forks source link

Bug: Filetype icons gets cropped #485

Closed mo-shaz closed 2 years ago

mo-shaz commented 2 years ago

Self Checks

How to reproduce the problem

I'm using Manjaro Linux and installed lualine via packer.

use { 'nvim-lualine/lualine.nvim', requires = {'kyazdani42/nvim-web-devicons', opt = true} }

 

I should apologize beforehand because this might not actually be a lualine specific issue because I've experienced the same issue while using airline.vim. If you could guide me through any config changes it would be really helpful. Thanks.

Expected behaviour

Should show the filetype icon properly.

Actual behaviour

Filetype icons gets cropped/chopped in half

lualine_bug

Minimal config to reproduce the issue

Config This is my lualine setup config

 

require('lualine').setup({ options = { theme = 'gruvbox_dark', }, sections = { lualine_b = {'branch', 'diff'}, lualine_c = {'filename', 'diagnostics'}, } }) NOTE: Even with the default config, the issue is found.
shadmansaleh commented 2 years ago

The issue is in the font you're using . Try a different parched font. lualine can't actually crop icons if it even wanted . It can only ask your terminal to render a specific character and how the terminal will render that character is defined by the font . Do this is most likely an issue with the font unless your terminal is doing something funny :D

mo-shaz commented 2 years ago

The issue is in the font you're using . Try a different parched font. lualine can't actually crop icons if it even wanted . It can only ask your terminal to render a specific character and how the terminal will render that character is defined by the font . Do this is most likely an issue with the font unless your terminal is doing something funny :D

That must be the issue. I'm pretty sure that this is NOT a lualine problem. Thanks for the reply. Can you give me hints on what fonts I should install and use?

shadmansaleh commented 2 years ago

You need a nerd-patched font . You can see if you like any from here . Or just patch your favorite font with their patcher tool.

mo-shaz commented 2 years ago

You need a nerd-patched font . You can see if you like any from here . Or just patch your favorite font with their patcher tool.

Okay. One more thing though. The icon shows perfectly on my tab (bufferline.nvim). So does that mean it's not a font problem and maybe something to do with my terminal config?

mo-shaz commented 2 years ago

Reopening issue for someone to notice. This very small issue is really annoying. Someone please help. :(

shadmansaleh commented 2 years ago

I don't think anyone will notice this here . You try on discourse or reddit . But fist you should try a different font and terminal . What font and terminal are you currently using ?

mo-shaz commented 2 years ago

I don't think anyone will notice this here . You try on discourse or reddit . But fist you should try a different font and terminal . What font and terminal are you currently using ?

Sorry about that, I'm new to GitHub too. I'm using Monospace and Konsole is my emulator. The thing is, the terminal can render the symbols pretty well, I tested it with the cheat-sheet section of nerd-fonts official site. It's just the status-line where the problem occurs. I will check out the given forums and enquire there. Closing the issue for the last time. Thanks for helping out :D.

shadmansaleh commented 2 years ago

Can you try kitty with fira-code fonts ? You can set fonts in kitty.conf as shown here

mo-shaz commented 2 years ago

Can you try kitty with fira-code fonts ? You can set fonts in kitty.conf as shown here

WTH, installed Kitty, didn't even need to configure anything and it just works (ʘ‿ʘ)╯. Thank you so much man. And thanks for Kitty, looks and feels snappy. Never going back to Konsole ᕕ( ᐛ )ᕗ.

giuskywalker commented 8 months ago

I'm having the very same issue, using ST, Hurmit Nerd Font Propo 2024-01-05_09-43-37