Giter Club home page Giter Club logo

Comments (4)

kyazdani42 avatar kyazdani42 commented on June 21, 2024

fuuuu an user yesterday wanted to load hl groups when requested to load nvim faster. But then, telescope users reported that the get_highlight_name was causing errors because it's called asynchronously and suggested wrapping in vim.schedule.
I guess maybe we should just revert back to how it was before.

from nvim-web-devicons.

kyazdani42 avatar kyazdani42 commented on June 21, 2024

should be fixed, sorry for the inconvenience

from nvim-web-devicons.

romgrk avatar romgrk commented on June 21, 2024

Cool! Beyond the inconvenience, I do understand the point of making things snappier. If you're interested in reinstating the behavior, maybe we could work out an API that is async-aware? E.g. it could return none or a default HL group (Normal?) if the function is called before the devicon HL group is defined.
And btw what was the issue for non-vim.schedule for telescope?

from nvim-web-devicons.

kyazdani42 avatar kyazdani42 commented on June 21, 2024

telescope uses get_highlight_name in a lua callback, so when we moved the nvim_command call inside of it, it broke because vim functions need to be wrapped in a schedule call when used asynchronously.
This is not too important rn, async stuff should be treated with caution and maybe rethinking how to make it work would take more time. Breakage like this is not supposed to happen, maybe tests would be required at some point.

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.