Originally Posted by Hedgehog95
I mean support of relative paths or special variable for project directory.
Can you define "project directory" precisely? In VSCode there are no projects, but workspaces, which are folders that have been opened in VSCode.
So in VSCode there are two contexts: workspace (which only exists if a folder is opened) and currently opened file.
There are THESE
substitution variables available, but they are only available within tasks.json, so that doesn't help us here as they are not resolved/expanded within settings.
There is some talk HERE
to support it in settings.json (which can be overriden per-workspace) but it hasn't been implemented yet, nor do extensions have a service to resolve those substitution variables.
I can write a substitution variables resolver I guess, but keep reading this post, what I am about to write may help you.
Originally Posted by JusTGo
can you add somthing like this :
// Where should compiler. Can be:
// - 'source' (same as input)
// - 'path' (specified in amxxpawn.compiler.executablePath setting)
if source is set in this case it will look amxxpc.exe in the input folder.
// Where should include files. Can be:
// - 'source' ( include directory, relative to input directory )
// - 'path' (specified in amxxpawn.compiler.includePaths setting)
"amxxpawn.compiler.includeType ": "source",
will look for include folder.
I don't think I want to support that, as there is probably no need. If you really have a folder with many files that may use a different compiler, then read THIS
. You can create a .vscode/settings.json
in your directory and then set your compiler path there.
Also, here is another (and probably better) solution - why not create a BUILD TASK
for your workspace?
Here's a working example:
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"taskName": "Compile Plugin",
Now when you open any file in that workspace you can just do Ctrl+Shift+B
and it will compile your plugin and put it in the output/