I have a few hundred AHK scripts and snippets. Is there any chance that Joplin will support the AutoHotkey syntax in the future? It’s a pretty popular scripting language for windows based automation tasks.
I think Joplin uses highlight.js, if that supports autohotkey then guaranteed Joplin will as well. Since Joplin doesn’t implement syntax highlighting itself, this change is very unlikely to happen (unless of course it is changed upstream).
Thanks for the reply, I checked the supported languages by highlight.js and AutoHotkey is supported but is limited at this time.
We use a custom build of highlight.js that only include some languages: https://github.com/laurent22/joplin/tree/master/ElectronClient/app/gui/note-viewer/highlight
The list is this one:
If someone wants to build a new custom package and include AutoHotKey or any other language I can merge it. See here to build the package: https://highlightjs.org/download/
For the record, the list above can be obtained by searching for
registerLanguage(".*" in the highlight.pack.js file.
I think there is more to the story here, because I regularly mark my code blocks with types that are not in this list, including
ahk for Auto HotKey.
Others that I use are
I have looked at a few of these code blocks and cycled through all of the languages listed in
highlight.pack.js and none of them give the same highlighting as when I use these keywords.
This is with the Electron app on Windows.
And plaintext or just text. I think anyway. I.e. there is a way to say “don’t syntax highlight please.”