PerlNavigator icon indicating copy to clipboard operation
PerlNavigator copied to clipboard

Allow use of more predefined VS Code variables in include paths

Open blues1875 opened this issue 1 year ago • 1 comments

The $workspaceFolder variable is already available for use in include paths. Would it be possible to allow the use of other predefined variables? I would find $fileDirname to be useful.

blues1875 avatar Feb 20 '24 20:02 blues1875

Sure, that's a good idea and should be straightforward. The change would primarily be located in getIncPaths in utils.ts. The only tricky part is that the includePaths is used in two different places. In addition to compilation results, it also is used for getting the list of importable modules for the entire workspace (e.g. autocompletion on use ...). I could adjust getIncPaths to skip paths with $fileDirname unless an input file is specified for compilation results. I'm happy to add it, unless you or anyone else wants to submit a pull request for this one.

bscan avatar Feb 20 '24 20:02 bscan