Code Monkey home page Code Monkey logo

Comments (3)

alexaandru avatar alexaandru commented on May 28, 2024

Well, after looking at the PR https://github.com/neovim/neovim/pull/14686/files - this is probably impossible to handle in this plugin, as it requires changing how the neovim runtime command works, which is the one responsible for the loading from the folders above mentioned...

from hotpot.nvim.

rktjmp avatar rktjmp commented on May 28, 2024

Yeah we can only hook lua's require path, so any plugin stuff cant be hooked.

Previously I posted this #41 but haven't personally tested it (probably fine though).

Not sure if there may bet an autocmd that could be hooked to act when RTP dirs are scanned, check for *.fnl files and load them.

You could hook VimEnter and manually search the whole rtp plugin/colors/etc folders and load the fennel files but I doubt that in particular would make it into Hotpot core as it's probably pretty expensive and would currently mean loading fennel if it found any files which is slow.

Probably the cache API should have a user function that creates a cache file for any given file. Right now you'd have to patch the lua package.path to include the non-standard dir the require normally.

All in all, having a lua "patch loader" is probably simplest.

from hotpot.nvim.

alexaandru avatar alexaandru commented on May 28, 2024

Thank you very much for the detailed reply. Yes, the solution from #41 should do and seems the cleanest for now. I've personally used it from colors folder (https://github.com/alexaandru/froggy/blob/master/colors/froggy.lua) but it should work from wherever lua files are supported.

Gonna close this one,

Cheers!

from hotpot.nvim.

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.