Hi,
I got help from the list, and in the end I did the following (I have ConTeXt installed in $HOME/ConTeXt-lmtx/). I hope it is complete.
ln -s $HOME/ConTeXt-lmtx/tex/texmf-context/context/data/vscode/extensions/context $HOME/.vscode/extensions/
Then I added a task file (also essentially found here, I think):
%%% Begin of file $HOME/.config/Code/User/tasks.json
{
"name" : "context",
"tasks" : [
{
"label": "ConTeXt LuaMetaTeX",
"type": "shell",
"command": "export PATH=$HOME/ConTeXt-lmtx/tex/texmf-linux-64/bin/:$PATH;mtxrun --autogenerate --script context '${file}'",
"args": [],
"options": {
"cwd": "${fileDirname}"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
%%% End of file
Then, in the extension setting inside code, I had to enable the color scheme for context.
Then it works to compile with ctrl+shift+B.
/Mikael
PS I also have some add-on for LaTeX installed, and for that reason I have started to use the file extension .mkiv for ConTeXt. Then the add-ons don't clash.