Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
147 stars 23 forks source link

Third-party includes' functions don't get suggested if there is an sp file inside the include folder #286

Closed tsuza closed 1 year ago

tsuza commented 1 year ago

Basic informations

Further Information

If there is an .sp file inside the folder where the includes reside, the MainPath will default to whatever the .sp file inside it is and the extension won't properly work on the file you're actually working on.

To Reproduce

  1. Put a plugin file inside SourcePawnLanguageServer.includesDirectories
  2. Try to use third-party includes in a plugin you're working on ( it can be any ).
Sarrus1 commented 1 year ago

Hey, thanks for reporting this! Ok it makes sense to not infer the mainpath from a file inside an includeDirectory.

Will fix asap!

In the meantime, you can manually set your mainpath to avoid this problem 👍

Sarrus1 commented 1 year ago

Fixed in https://github.com/Sarrus1/sourcepawn-lsp/commit/448af8144370cebe23fd5314c92aeaaf29561180.