File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
modules/language-server/src/main/java/nextflow/lsp/services Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import nextflow .lsp .util .Positions ;
23
23
import nextflow .lsp .util .LanguageServerUtils ;
24
+ import nextflow .script .dsl .Constant ;
24
25
import nextflow .script .parser .TokenPosition ;
25
26
import org .codehaus .groovy .ast .ASTNode ;
26
27
import org .codehaus .groovy .ast .CodeVisitorSupport ;
@@ -165,7 +166,11 @@ else if( value instanceof String )
165
166
166
167
@ Override
167
168
public void visitVariableExpression (VariableExpression node ) {
168
- if ( !(node .getAccessedVariable () instanceof DynamicVariable ) )
169
+ var variable = node .getAccessedVariable ();
170
+ var mn = asMethodVariable (variable );
171
+ if ( mn != null && !findAnnotation (mn , Constant .class ).isPresent () )
172
+ append (node , SemanticTokenTypes .Function );
173
+ else if ( !(variable instanceof DynamicVariable ) )
169
174
append (node , SemanticTokenTypes .Variable );
170
175
}
171
176
You can’t perform that action at this time.
0 commit comments