There really needs to be a tutorial

While the documentation is very clear, I honestly do not know where to start when making an extension. I’d really like to use Nova over VsCode, but the languages I need to use are not supported. I thought I would port a VsCode Extention or just a language server, but I am totally lost even after looking through the documentation.

Is there a plan for a tutorial, or could perhaps someone from the lovely community who has managed to make an extension write one? I would be very, very happy.

5 Likes

I used built-in extensions to explore. I opened them and watched what was being done.
My path is not the easiest, but it helped me write a very large language extension (Parser 3).

I feel the same way. It’s overwhelming and Nova isn’t as useful as I hoped without some of the extensions.

I sympathise with the sentiment that developing your first Nova extension can be daunting; it is, essentially, a trial and error process with API quirks, documentation glitches and the latter’s lack of general introductory and concept level subject matter standing in your way. While the mentioned points could all be improved, I would submit that the fact Nova extensions can do a lot of fundamentally unrelated things makes it difficult to provide a one size fits all tutorial.

To whit, I have by now developed two Nova extensions, one a simplistic language extension for a JavaScript dialect (JXA), one a linting system (µESLint), and I am currently working on a complex language extension (for the fish shell scripting language – unpublished yet). All of these present quite unique challenges: injecting syntax into an existing language (JXA), discovering dependencies on the user’s system in real time and circumnavigating the pitfalls of asynchronicity (µESLint), reliable highlighting and symbolication of a language whose semantics are mostly positional, not syntactic (fish). I would be utterly lost if anybody asked me for “a tutorial“, as the things these extensions have in common boil down to the basics that are provided by Nova’s extension templates, making the interesting parts too specific to serve as introductory help.

Also, having developed two moderately successful Vim extensions and having mucked around in the guts of some Atom extensions before, I can vouchsafe that Nova’s extension creation process, extension API and documentation are way and above average. Do I wish Panic had adopted Node instead of Apple’s JSC as a runtime? Yep. Would I like a debugger? Heck yes. Do I sometimes try to tear out what little hair I still have over documentation omissions or plain errors? You bet. I still wouldn’t want to switch back, for a second (I mean, have you ever, actually, looked at VimScript other than in anger?).

This is not quite the tangent it might appear to be: last time I looked, the much larger Vim extension ecosystem had just about managed to create walk-throughs and introductions to extension development at a level that Panic cover out of the box, and Atom’s docs on extension creation, while friendly, did no more than that either. Panic have provided us with a significant head start, even if it may not look that way at first glance. With the provided templates, mostly sane API documentation, well crafted builtin extensions and a central repository of third party extensions ready to explore, we are well set. Would complementary tutorials be nice? Yep. Are they likely to happen? For the reasons above, I’d say no. Is that cause for despair? YMMV, but I’m firmly in the “no” camp.

6 Likes