CodeMirror 6 TiddlyWiki Plugin - Recent Updates
Here’s a summary of improvements made to the CodeMirror 6 editor plugin for TiddlyWiki.
Filter Autocompletion Enhancements
Completions Now Work in Plain Text Filter Expressions
Previously, filter operator completions only worked inside confirmed filter contexts like {{{filter}}} or filter="...". Now, a new IncompleteFilterRun parser detects filter-like patterns in plain text, enabling completions as you type.
Example: Typing [list[$:/StoryList]get[ now shows filter operator completions even in regular paragraph text.
Support for Function-Style Operators
-
Dots in function names: Custom functions like
[my.function[operand]]are now properly recognized -
Multiple operands: Functions with multiple parameters like
[my.func[a],[b]]or[my.func<var1>,<var2>]are now fully supported for both completions and syntax highlighting
Smarter Context-Aware Completions
-
[imgand[extcompletions (for image/external links) now only appear when the context is ambiguous - they no longer show up inside confirmed filter contexts where they wouldn’t be valid -
Chained operators after
[operator[operand]]now properly trigger completions
Linter Improvements
Action Variable Recognition
The linter now recognizes implicit action variables provided by TiddlyWiki widgets. Variables like actionTiddler, actionValue, modifier, etc. are no longer flagged as undefined when used within action attributes.
Supported widgets include:
-
$droppable/$dropzone:actionTiddler,actionTiddlerList,modifier -
$checkbox/$radio/$select/$range:actionValue -
$eventcatcher:dom-*,modifier,event-*,tv-popup-coords, etc. -
$linkcatcher:navigateTo,event, etc. -
$keyboard:event,modifier
Nested Pragma Parameter Inheritance
Parameters from outer pragmas are now properly inherited by nested pragmas:
\procedure outer(param1)
\procedure inner()
<!-- param1 is now recognized here -->
\end
\end
Parser Improvements
Inline Code with Double Backticks
The parser now correctly handles double-backtick inline code: ``code with `single` backtick inside``
Improved Escape Handling
Backslash escapes (\x) are now only recognized for actual wiki syntax characters, reducing false positives.
Highlight/Styled Span Improvements
The @@styled@@ syntax now properly handles CSS styles followed by classes:
@@color:red;font-weight:bold;.myclass Some styled content@@
WikiLink Placeholder Support
Links can now use $param$ placeholders in their targets:
[[Link Text|$targetParam$]]
Inline KaTeX/LaTeX Support
When KaTeX is enabled, inline math expressions $$formula$$ are now properly parsed and highlighted.
Editor Engine Improvements
Auto-Close Variable Substitution
Typing $( in a \define block now auto-completes to $()$ with the cursor positioned for variable name entry. This smart completion adapts to existing brackets.
Variable Completions in Substitution Context
When inside $(...) in a \define macro, typing triggers variable name completions.
Click-Navigate Cursor Fix
Fixed an issue where the pointer cursor could remain after Ctrl+clicking navigable links.
These updates improve both the editing experience and code quality checking. The filter completion system in particular is now much more robust, supporting the full range of TiddlyWiki’s filter syntax including custom functions with multiple operands.



