diff --git a/config.nims b/config.nims new file mode 100644 index 0000000..d62171e --- /dev/null +++ b/config.nims @@ -0,0 +1,14 @@ +import os + +switch("backend", "js") +switch("outdir", "out") +switch("sourceMap", "on") +switch("path", "src") +switch("define", "nimsuggest") +switch("define", "nodejs") +switch("define", "js") + +# Add nim's installation path to the search paths so that nimsuggest can be found +let nimInstallationDir = absolutePath(splitPath(getCurrentCompilerExe()).head / "..") +if dirExists(nimInstallationDir / "nimsuggest"): + switch("path", nimInstallationDir) diff --git a/nim.cfg b/nim.cfg deleted file mode 100644 index 57e4444..0000000 --- a/nim.cfg +++ /dev/null @@ -1,9 +0,0 @@ ---backend:js ---outdir:out ---sourceMap - ---path:"src/" - -define:nimsuggest -define:nodejs -define:js \ No newline at end of file diff --git a/package.json b/package.json index fc59bc0..700c6f6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nimvscode", "displayName": "Nim", "description": "Nim language support for Visual Studio Code written in Nim", - "version": "0.1.26", + "version": "0.1.27", "publisher": "nimsaem", "author": { "name": "Saem" @@ -202,15 +202,19 @@ "nim.projectMapping": { "type": "array", "default": [], - "description": "For non project mode list of per file project mapping using regex, for example ```{\"fileRegex\": \"(.*).inim\", \"projectFile\": \"$1.nim\"}```", - "properties": { - "fileRegex": { - "type": "string", - "description": "Source file regex" - }, - "projectFile": { - "type": "string", - "description": "Project file path" + "description": "For non project mode list of per file project mapping using regex, for example ```[{\"fileRegex\": \"(.*).inim\", \"projectFile\": \"$1.nim\"}]```", + "items": { + "type": "object", + "title": "mapping", + "properties": { + "fileRegex": { + "type": "string", + "description": "Source file regex" + }, + "projectFile": { + "type": "string", + "description": "Project file path" + } } }, "scope": "resource"