openscad-support-vscode icon indicating copy to clipboard operation
openscad-support-vscode copied to clipboard

Inner module only completes after its declaration location, not before

Open mjparme opened this issue 2 years ago • 1 comments

When you have an inner module the plugin only completes the module if you use it after its declaration location, not before.

module topLevelModule() {
   //will not get innerModule completion here
    module innerModule() {

    }

   //you will get a completion for innerModule here
}

It is perfectly fine to call the inner module before its declaration location. Indeed, completions for top level modules work in all locations. I have attached a gif demonstrating the problem:

innerModuleCompletionBug

mjparme avatar Sep 02 '22 15:09 mjparme

For performance, now only search backwards for symbols instead of searching for all symbols. You can move the inner module to a separate file to around this problem for now.

Leathong avatar Sep 05 '22 03:09 Leathong