Fixed json parsing: true/false undefined

This commit is contained in:
Yuriy Glukhov 2018-12-12 12:23:20 +02:00 committed by zah
commit f5473ff98b

View file

@ -19,6 +19,8 @@ fun! nim#init()
let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile())
let raw_dumpdata = system(cmd)
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 b:nim_project_root = dumpdata['project_path']