For the first question, I don’t know either.
Since I use vscode in MacOsX, you may find your way in Linux.
There is a tasks.json file in .vscode folder.
I added the following script in the “tasks":[ ] and save it.
(You have to modify the "texmf-osx-64/bin” path in the following script from your machine.
{
"label": "ConTeXt LuaMetaTeX",
"type": "shell",
"command": "export PATH=/Users/graph/ConTeXtLM/tex/texmf-osx-64/bin:$PATH;mtxrun --autogenerate --script context --autopdf --purge '${file}'",
"args": [],
"options": {
"cwd": "${fileDirname}"
},
"group": {
"kind": "build",
"isDefault": true
}
},
When you want to compile a ConTeXt file, find “terminal > Run Build task” in the menu,
then “ConTeXt LuaMetaTex” will pop up.
Or just use the key “command-shift-B” instead using menu item.
I hope that it may help.
Best wishes,
Dalyoung