File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
extension/server/src/providers Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export default async function completionItemProvider(handler: CompletionParams):
8484 if ( ! word ) break ;
8585
8686 if ( currentDef ) {
87- if ( currentDef . subItems && currentDef . subItems . length > 0 ) {
87+ if ( currentDef . type !== `procedure` && currentDef . subItems && currentDef . subItems . length > 0 ) {
8888 currentDef = currentDef . subItems . find ( subItem => subItem . name . toUpperCase ( ) === word ) ;
8989 }
9090
@@ -94,8 +94,6 @@ export default async function completionItemProvider(handler: CompletionParams):
9494 if ( currentDef ) {
9595 if ( currentDef . type === `struct` && currentDef . keyword [ `QUALIFIED` ] === undefined ) {
9696 currentDef = undefined ;
97- } else if ( currentDef . type === `procedure` ) {
98- currentDef = undefined ;
9997 }
10098
10199 // All good!
@@ -219,6 +217,10 @@ export default async function completionItemProvider(handler: CompletionParams):
219217 item . insertText = `${ procedure . name } (${ procedure . subItems . map ( ( parm , index ) => `\${${ index + 1 } :${ parm . name } }` ) . join ( `:` ) } )` ;
220218 item . detail = prettyKeywords ( procedure . keyword ) ;
221219 item . documentation = procedure . description ;
220+
221+ if ( procedure . subItems . length > 0 ) {
222+ item . command = { command : `editor.action.triggerParameterHints` , title : `Trigger Parameter Hints` } ;
223+ }
222224 items . push ( item ) ;
223225 }
224226
You can’t perform that action at this time.
0 commit comments