Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of more predefined VS Code variables in include paths #114

Open
blues1875 opened this issue Feb 20, 2024 · 1 comment
Open

Allow use of more predefined VS Code variables in include paths #114

blues1875 opened this issue Feb 20, 2024 · 1 comment

Comments

@blues1875
Copy link

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.

@bscan
Copy link
Owner

bscan commented Feb 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants