Giter Club home page Giter Club logo

Comments (7)

kyazdani42 avatar kyazdani42 commented on July 2, 2024 1

This was intended behavior. I wrote this plugin to solve performance issues in my tree regarding vim-devicons, but my tree only needs to pass the filename as it is so it does not really matter to me.
Thing is, the more we add more logic inside this plugin, the slower it'll get for every user of the library. A note in the readme might be more appropriate, although i'm not sure the performance implications would be tremendous adding some parsing logic on the pathnames. I think i would accept a PR :)

from nvim-web-devicons.

gegoune avatar gegoune commented on July 2, 2024

@saviocmc Do you know if your solution was adopted by Telescope team?

from nvim-web-devicons.

saviocmc avatar saviocmc commented on July 2, 2024

@gegoune Yes, it was! Telescope now uses only the file name (not the complete file path, as before) to call this plugins, this way the icons are always consistent. This issue can be closed. Sorry for the delay, appreciate your work.

from nvim-web-devicons.

saviocmc avatar saviocmc commented on July 2, 2024

For future reference, here is the helper function that seems to do the trick:

https://github.com/nvim-telescope/telescope.nvim/blob/a3f17d3baf70df58b9d3544ea30abe52a7a832c2/lua/telescope/utils.lua#L175

Perhaps it could be added to this plugin as an input sanitization step if it proves not to be a significant performance hit.

from nvim-web-devicons.

gegoune avatar gegoune commented on July 2, 2024

That's is a good news, thank you for getting back to us!

from nvim-web-devicons.

gegoune avatar gegoune commented on July 2, 2024

@alex-courtis Wouldn't #84 (comment) solve regex issues?

from nvim-web-devicons.

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

@alex-courtis Wouldn't #84 (comment) solve regex issues?

We could add an option like the very recently added strict https://github.com/nvim-tree/nvim-web-devicons#get-icon

I'm very hesitant to make any changes that might break existing behaviour, as the blast radius for this plugin is very large.

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.