Giter Club home page Giter Club logo

Comments (10)

l1n3n01z avatar l1n3n01z commented on July 20, 2024 1

@l1n3n01z Without sounding negative/demanding - is that something you could come up with PR for? It would be greatly appreciated and accepted. I surely lack enough unicode knowledge to push it further.

I will have to read up on the contributing guidelines and in general how to do PRs on github, but I'm happy to.

from nvim-web-devicons.

kyazdani42 avatar kyazdani42 commented on July 20, 2024

hi !
I wouldn't encode each character icon by default, but maybe encoding only the needed icons should suffice, maybe making some rtl_wrap function that you would pass like icon = rtl_wrap('ﭨ'). My terminal handles this by default so i cannot really spend time debugging this, but you could make a PR when you have time :)

from nvim-web-devicons.

l1n3n01z avatar l1n3n01z commented on July 20, 2024

hi ! I wouldn't encode each character icon by default, but maybe encoding only the needed icons should suffice, maybe making some rtl_wrap function that you would pass like icon = rtl_wrap('ﭨ'). My terminal handles this by default so i cannot really spend time debugging this, but you could make a PR when you have time :)

Your terminal "works" because it does not handle RTL at all. More featureful terminals do. Mintty and Kitty at least. So really this is a bug and should be fixed.

The smallest possible fix would be to fix it in the default icons. Check which icons there are RTL and wrap them with the correct characters manually. This would mean that the defaults are not broken for users of terminals that support RTL.

from nvim-web-devicons.

alex-courtis avatar alex-courtis commented on July 20, 2024

Thank you @l1n3n01z

The pragmatic solution is indeed to use a sane terminal.

from nvim-web-devicons.

jdrouhard avatar jdrouhard commented on July 20, 2024

This shouldn't have been closed yet.

from nvim-web-devicons.

alex-courtis avatar alex-courtis commented on July 20, 2024

This shouldn't have been closed yet.

What is outstanding? This is a problem with the terminal, not nvim-web-devicons.

from nvim-web-devicons.

l1n3n01z avatar l1n3n01z commented on July 20, 2024

This shouldn't have been closed yet.

What is outstanding? This is a problem with the terminal, not nvim-web-devicons.

There is still an outstanding bug in Unicode handling in this project.

Mintty is the only terminal for WSL that behaves correctly for a variety of TUI tools. Kitty is one of the most popular terminals on Mac.

These terminals are sane in the way they handle RTL characters. That is, for people who use RTL alphabets in their day to day work in a terminal environment. They also behave correctly in this regard according to the semantics of Unicode.

Terminals that don't handle RTL correctly are deficient for this particular use case.

When a project decides to use Unicode characters that have particular semantics for display purposes, they have a responsibility to do so in a sane way.

I have described an easy solution. In the default configuration, shield the character with characters that change the semantics so that it can be used for display purposes.

Another solution would be to only use Unicode characters in the default configuration that you actually know how to use correctly.

The solution that you seem to have chosen, to ignore the problem, means that users will first have to understand what is wrong, which takes a long time.

Then they have to do one of the following:

  1. Find a terminal that is objectively worse for their day to day work (i.e. switch to a terminal that suck for WSL, switch to a terminal that doesn't handle terminal graphics or that doesn't handle colors or cannot render their native language in the way it should when writing emails or for note taking)
  2. Change the default configuration, with the caveat that this needs some extra coding to handle color scheme changes.
  3. Stop using a project that makes their nvim file tree slightly prettier but messes up the text rendering in a lot of cases.
  4. Fork the project, locally or otherwise, which means maintenance.

The default config should not break text rendering in any modern terminal. You have had several bug reports on this issue. Maybe fix it instead of being facetious about it?

from nvim-web-devicons.

gegoune avatar gegoune commented on July 20, 2024

@l1n3n01z Without sounding negative/demanding - is that something you could come up with PR for? It would be greatly appreciated and accepted. I surely lack enough unicode knowledge to push it further.

from nvim-web-devicons.

jdrouhard avatar jdrouhard commented on July 20, 2024

In the very least, please reopen this issue.

from nvim-web-devicons.

alex-courtis avatar alex-courtis commented on July 20, 2024

What is the appearance of the icons following grep 'icon = "' lua/nvim-web-devicons.lua?

from nvim-web-devicons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.