I’m just working with some TW + NodeJS stuff, and finding that my VS Code editor is suggesting a great TW5 syntax plugin.
Thanks @joshuafontany for creating this!
I’m just working with some TW + NodeJS stuff, and finding that my VS Code editor is suggesting a great TW5 syntax plugin.
Thanks @joshuafontany for creating this!
It auto suggested it for you? Cool! Very glad it is useful.
Bump. v2.0.0 has been released!
That’s cool. Perhaps we should add a .vscode directory to the TW5 repo, and include a recommendation for tw5-syntax. Are there other features that would be helpful to include?
Update v2.0.2 posted.
snippets/snippets.json
fixes from @pmario
:anything
, and “shortcut filter run prefixes”, i.e. +|-|~|=
THANKS!
I was able to find out how to include this in the plugin’s /contributes
section. Automatic JSON highlighting for all *.info
and *.files
files!
Thank you for the update @joshuafontany, it is highly appreciated. A small request if you have time, support for detecting indented macros/procedures.
Example code:
\procedure saveNewWikiActions()
\procedure saveNewWikiCallback()
\procedure failureHandler()
<$action-log status="error saving new wiki to the server"/>
<$action-setfield $tiddler={{{ [[$:/temp/webdav/error/]addsuffix<now [UTC]YYYY0MM0DD0hh0mm0ssXXX]>] }}} text={{{ [[There was an error creating the new wiki. ]addsuffix<error>] }}} component="WebDAV save new wiki" tags="$:/tags/Alert"/>
\end failureHandler
<$list filter="201 204 :intersection[<status>]" variable="null" emptyMessage=<<saveNewWikiCallbackFailure>> >
<$action-sendmessage $message="tm-notify" $param="$:/plugins/sq/webdav-utils/ui/templates/wiki-created" path=<<destinationURL>> />
<$action-deletetiddler $filter="$:/temp/sq/fs/new-wiki-template-url $:/temp/sq/fs/new-wiki-name"/>
<$action-sendmessage $message="tm-webdav-ls" $param={{{ [<destinationURL>split[/]butlast[]join[/]trim[/]!is[blank]addsuffix[/]addprefix[/]] :else[[/]] }}} />
</$list>
\end saveNewWikiCallback
<$wikify name="myplugins" text={{$:/plugins/sq/webdav-utils/templates/new-wiki-plugins}}>
<$action-sendmessage
$message="tm-http-request"
method="PUT"
bind-status="$:/state/webdav/http-status"
oncompletion=<<saveNewWikiCallback>>
url=<<destinationURL>>
body={{{ [<data>addprefix<myplugins>] }}}
var-destinationURL=<<destinationURL>>
>
</$wikify>
\end saveNewWikiActions
Mahalo (thanks). Clean example code like this makes it much easier to test these types of updates.
Update 2.0.6 released just now (give it 5 minutes).