how do I create a nvim plugin that uses fennel? #111
-
I'd like to create a brand new plugin using fennel instead of lua. Is there a guide on how to do this? I'd prefer to use hotpot since I'm already using it for my setup. I can probably figure out how to transcompile plugin fennel code to lua following the example of hotpot itself, but I wanted to know if there is already a clean, straightforward option. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Oh, sorry, I jsut found this though it said it is out of date. |
Beta Was this translation helpful? Give feedback.
-
I think I more-or-less got this working. However, I would really appreciate an explicit example of exactly what you'd expect to see in a plugin for using fennel if you'd be so kind 🙂 |
Beta Was this translation helpful? Give feedback.
-
Ah, this example fully answers my question: https://github.com/rktjmp/paperplanes.nvim |
Beta Was this translation helpful? Give feedback.
-
Sorry, I have some long-time-coming work in the pipe that will make this a bit nicer. Basically you write a .hotpot.lua file that wraps the api.make stuff as seen in paperplanes and rebuild-on-save function (sort of like the fnl-init example) for you. You'll hit a speed bump with hotpots lua precedence preference which will need you to turn on colocation, but be aware I am actually planning to deprecate that option I think as having it and the .hotpot file is confusing. So you'll hit a bit of code churn I am in the midst of rebuilding some drives after a failure so it might take me a bit to finish out this stuff and update the documentation. I am hoping to get it all out this weekend. |
Beta Was this translation helpful? Give feedback.
-
I have update the docs to the latest method which should be quite painless. Unfortunately the previous make api could not be kept around for a deprecation period, but migrating to the new api should be simple, it's basically the same idea but simpler. https://github.com/rktjmp/hotpot.nvim/blob/master/COOKBOOK.md#writing-a-plugin |
Beta Was this translation helpful? Give feedback.
-
Great, thanks! |
Beta Was this translation helpful? Give feedback.
I have update the docs to the latest method which should be quite painless. Unfortunately the previous make api could not be kept around for a deprecation period, but migrating to the new api should be simple, it's basically the same idea but simpler.
https://github.com/rktjmp/hotpot.nvim/blob/master/COOKBOOK.md#writing-a-plugin