[Visual Studio Code][Beta] TwiddlyWiki5 Syntax Highlighting for VSCode!

150 views
Skip to first unread message

Joshua Fontany

unread,
Mar 28, 2020, 3:52:08 PM3/28/20
to tiddly...@googlegroups.com
Hi!

I've thrown together a quick extension for Visual Studio Code to enable syntax highlighting. I have not yet added it to the MS Marketplace, so you cannot find it through VSCode's Extensions tab quite yet...


---

I use Bob on Node.js and author plugins as folders separate from my tiddlywiki and wikis directories. This means I am often tweaking or editing UI tiddlers, etc, etc inside of plugins while the server is down, then restart it to run tests, etc. Syntax highlighting is going to be a huge benefit to this workflow.


At this time I am mainly relying on a "named" syntax-highlighiting grammar built for the Atom text editor. This grammar is fairly well developed, but can totally be improved as I learn more about syntax highlighting.,


There may be another way to set this up, instead of making up a language named "TiddlyWiki5" I could "inject" the wikitext rules into the base HTML context. Then setup the field-contexts to be pared as HTML(Extended).... 


But for now this one that defines rules for most of the wikitext as a new language will do.

Best,

Joshua Fontany

SylvainComte

unread,
Mar 29, 2020, 7:26:15 AM3/29/20
to TiddlyWikiDev
Joshua,

In few words : thanks for this! You made my day.

I did try to do it a while ago, but I didn't get enough time to progress enough...

I'll try this asap.

Cheers

Sylvain
@sycom

Joshua Fontany

unread,
Apr 7, 2020, 12:43:58 AM4/7/20
to TiddlyWikiDev
Hi, please find an updated repo on Github.

I have updated link, string, and pragma recognition. Fixed a few other syntax bugs. You will definitely see a lot more higlighting.

Next up, improving Filter highliting.

Best,

Joshua Fontany

Mohammad

unread,
Apr 7, 2020, 5:31:38 AM4/7/20
to TiddlyWikiDev
Many thanks Joshua,
It is really wonderful!


I love the intellisense feature! like autocomplete <$list ....

Thank you
Mohammad 

LinOnetwo

unread,
Apr 9, 2020, 5:41:12 AM4/9/20
to TiddlyWikiDev
Wow, that is very useful, when developing plugin.

Looking forward to your release to marketplace!

在 2020年3月29日星期日 UTC+8上午3:52:08,Joshua Fontany写道:

TonyM

unread,
Apr 12, 2020, 2:58:55 AM4/12/20
to TiddlyWikiDev
I believe with atom you can use a browser plugin to edit a text area in an external editor so this could be used on top of a single file wiki (without codemirror) on a per tiddler basis.

Regards
Tony

Joshua Fontany

unread,
Apr 12, 2020, 8:25:20 PM4/12/20
to TiddlyWikiDev
Version updated to 0.1.2:

## 0.1.2

- Improved variable, tranclusion, link, and macro definition recognition
- Setup seperate "language names" for *.tid / *.meta ("tid"), vs  / *.multids files ("multitids") vs *.tw / *.tw5 wikitext ("tiddlywiki5"). This helps debugging and with certain grammar features (injections).
- Mapped MIME types

On Saturday, March 28, 2020 at 12:52:08 PM UTC-7, Joshua Fontany wrote:

Mohammad

unread,
Apr 15, 2020, 8:35:58 AM4/15/20
to TiddlyWikiDev
Hi Josua, 
Many thanks

Minor comment

Intelisence

<$set 

does not work

--Mohammad

Joshua Fontany

unread,
Apr 15, 2020, 7:15:19 PM4/15/20
to TiddlyWikiDev
Thank you Mohammad,

Could you open an issue in the Github Repo? Mahalo (thanks)!

Best,
Joshua F

Mohammad

unread,
Apr 16, 2020, 12:28:25 AM4/16/20
to TiddlyWikiDev
Sure!
Reply all
Reply to author
Forward
0 new messages