File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,23 @@ export function getGlobalDeclarations({
58
58
const word = symbol . name
59
59
globalDeclarations [ word ] = symbol
60
60
}
61
+ } else if ( node . type === 'command' && node . text . startsWith ( ': ' ) ) {
62
+ const variableNode = node . namedChildren
63
+ . find ( ( c ) => c . type === 'string' )
64
+ ?. namedChildren . find ( ( c ) => c . type === 'expansion' )
65
+ ?. namedChildren . find ( ( c ) => c . type === 'variable_name' )
66
+
67
+ if ( variableNode ) {
68
+ const symbol = LSP . SymbolInformation . create (
69
+ variableNode . text ,
70
+ LSP . SymbolKind . Variable ,
71
+ TreeSitterUtil . range ( variableNode ) ,
72
+ uri ,
73
+ )
74
+ if ( ! globalDeclarations [ symbol . name ] ) {
75
+ globalDeclarations [ symbol . name ] = symbol
76
+ }
77
+ }
61
78
}
62
79
} )
63
80
Original file line number Diff line number Diff line change @@ -14,4 +14,8 @@ extensionFunc() {
14
14
innerExtensionFunc () {
15
15
echo $LOCAL_VARIABLE
16
16
}
17
- }
17
+ }
18
+
19
+ : " ${FILE_PATH:= " /default/file" } "
20
+
21
+ printf ' Printing %s\n' " $FILE_PATH "
You can’t perform that action at this time.
0 commit comments