Language, completions, snippets, keybindings, and tools: How many packages?


#1

I am new to the whole package creation thing, but wish to create one or more packages to help work with MathbookXML files (used to author mathematics textbooks), which are a special flavor of XML. I will want some custom syntax highlighting, a good number of snippets and autocomplete functionality, as well as some tools to insert references, jump to sections, and the like, all with keybindings. I don’t know how to do much of this, but I’m eager to figure it all out by adapting other packages.

My question is this: should all of this go in one package (say “MBXTools”) or into multiple packages (like “language-mbx,” “autocomplete-mbx” and “MBXTools”)? It is likely that I’ll be the only one working on this, but there might be others who find the package(s) useful. What are the conventions for such a situation?

Thanks,
Oscar.


#2

I say start with a language-mbx grammar and write all of your code in there. If you decide at some point to break it up, it wouldn’t be too hard to split up the code by functionality.


#3

If it is all to support one language, then I would recommend putting it all in one package with perhaps one exception: any over-and-above autocomplete support. Snippets show up in autocomplete automatically thanks to the built-in autocomplete-snippets package, so unless you’re planning on doing more autocomplete support than that … then just one package is normal.