Serpen / VBS-VSCode

VSCode VBScript language extension
https://marketplace.visualstudio.com/items?itemName=Serpen.vbsvscode
MIT License
24 stars 12 forks source link

Custom Include Pattern does not work #52

Closed teremok87 closed 3 years ago

teremok87 commented 3 years ago

I try to use this Include pattern [Ii][Nn][Cc][Ll][Uu][Dd][Ee]\s(?[\s]"([^"]+)"[\s]*)?
for this Include "lib.vbs"

have two files in the folder main.vbs :

Include "lib.vbs"

Sub Main Hura() End Sub

and

lib.vbs:

Sub Hura () Dim vHura : vHura = "Hura!!" End Sub

Peek and Go to Definition does not work for Hura() in the file main.vbs

When i add this folder as Custom Include Dir, then it works fine. But i want only use this setting for libraries directory

By the way with the default Include Pattern it does not work as well

Serpen commented 3 years ago

The include search path per default is only the workspace root folder not the folder where the used file is.

So '.' means ${workspaceFolder} this is a little unclear in my definition.

If you put your lib file in the workspace root it will work?

I will investigate if i can change this behaviour, but i think there was a strange problem with that.

teremok87 commented 3 years ago

This was my mistake, I did't noticed, that "." is converterted to any path. I replace from the beginning this "." by my own libraries path. That was the reason becouse it does not worked for local libs anymore. "." is back and now it works like i expect.

Thank you very mach for your reply and for the plugin. It is very very usefull. Well Done! Und Servus aus Bayern :)

Serpen commented 3 years ago

Dann kann ich ja auf deutsch schreiben ^^ Trotzdem lasse ich den Bug mal offen und werde in der nächsten Version was fixen.

'.' wird aktuelle Verzeichnis werden und '${workspaceFolder}' wird das arbeitsmappen root werden

moin aus schleswig-holstein