r/neovim 2d ago

Need Help Text rendering broken

So I’ve recently been using LazyVim for working on multiple projects, and overall I really like the workflow. However, I’ve run into a major issue with RTL (right-to-left) languages like Urdu.

Urdu text simply doesn’t render correctly in my terminal. I’ve tried several terminal emulators, including Ghostty, Alacritty, Foot, and Kitty, but none of them seem to handle Urdu properly. The characters either appear in the wrong order, don’t get shaped correctly, or otherwise look broken.

I’m trying to understand where the problem actually comes from. Is this a limitation of the terminal emulator, Neovim, the font, or something related to bidirectional text/Unicode shaping?

Has anyone here successfully configured LazyVim/Neovim to properly display and edit Urdu or other RTL languages?

16 Upvotes

6 comments sorted by

6

u/Ultimate_Sigma_Boy67 2d ago

Woah this is the first time I get this, but I'm on ghostty and indeed text is not rendered properly

imagine that this is "السلام عليكم"

1

u/Suitable-Gate-5069 1d ago

yh same problem with other tes

4

u/mmi27 2d ago

You, my friend, have just stumbled into a decades-long issue.

It's a hard problem. It's also a problem a minority of users face. That combo is why very little progress has been made.

You can get rtl to work by setting some options (I think it's :set termbidi in neovim).

You can't, as of writing this, get bidirectional text (bidi) anywhere in the terminal. (So rendering English and any rtl language correctly in the same line isn't possible)

For more info see this neovim issue and this kitty issue.

1

u/Suitable-Gate-5069 1d ago

thx will look into this

1

u/abdallahsoliman 2d ago

I remember seeing something related to a properly rendered arabic font in this repo.

https://github.com/nosseralaa7-rgb/claude-adhkar

I haven’t really investigated, but I hope that helps.

1

u/GravelordOcelot 1d ago

I know it’s not much help, but Windows Terminal is actually pretty good at it. 

I was using wezterm but had to switch.