Fixed json parsing: true/false undefined
This commit is contained in:
parent
b0c4c6c731
commit
f5473ff98b
1 changed files with 2 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ fun! nim#init()
|
||||||
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
|
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
|
||||||
let raw_dumpdata = system(cmd)
|
let raw_dumpdata = system(cmd)
|
||||||
if !v:shell_error && expand("%:e") == "nim"
|
if !v:shell_error && expand("%:e") == "nim"
|
||||||
|
let false = 0 " Needed for eval of json
|
||||||
|
let true = 1 " Needed for eval of json
|
||||||
let dumpdata = eval(substitute(raw_dumpdata, "\n", "", "g"))
|
let dumpdata = eval(substitute(raw_dumpdata, "\n", "", "g"))
|
||||||
|
|
||||||
let b:nim_project_root = dumpdata['project_path']
|
let b:nim_project_root = dumpdata['project_path']
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue