Closed adriangaro closed 1 year ago
Until latest plugin version 1.0.6, for script parameter value (including inline script parameter value), advanced language features (e.g. code completion, code highlighting) can be provided, if and only it's used as a entire script expression ($PARAM$
, not PREFIX_$PARAM$
) and the CWT configs of this script expression can be inferred, with no conflictions.
You may check this feature by open one of the script files under common/traits
.
For other conditions, like:
PREFIX_$PARAM$
- may provider support in the future.PARAM = "k=v k1=v1"
- may provide support in the future. For it's CWT configs cannot be inferred (it's a script snippet rather than a script expression (snippet)), the implemention could be somehow tricky...maybe can be implemented by Language Injection
? Humm...PS: Please try not to use such a tricky syntax...
Implemented for parameters as (quoted) full property values and values by Language Injection.
Would it be possible to enhance inline scripts support to syntax highlight inside parameters?
If not automatically, would be neat if some kind of convention could be used to highlight type of parameter, something along the lines (just pseudocode of comment annotations inside the inline):
Perhaps, if somehow could hint at other datatypes the plugin recognized
scripted_trigger
modifier
resource
etc would be a big boon in the use of inlines.Some examples on how i use inlines, where triggers might be passed to the underlying inline:
where the
$trigger$
is used as such in the inline itself (warning nested inlines):Another example for passing modifiers (and an ai_weight sections, if we can hint it is an script_value like section) to the inside of an inline:
PS: Found recently the plugin and it is amazing compared to the VSCode one. Kudos!