summaryrefslogtreecommitdiffstats
path: root/autoload/nim.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
commit87a26c5bf169bafbee837e2323f24cfb07e35250 (patch)
tree326eb21bb10c3d3633b83263d21c85c98f92a67e /autoload/nim.vim
parent918610d427503c5c7b380eae4a954bd8cb427db5 (diff)
downloadvim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.tar.gz
vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.zip
Update
Diffstat (limited to 'autoload/nim.vim')
-rw-r--r--autoload/nim.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/autoload/nim.vim b/autoload/nim.vim
index c0faf6e1..7f55f25f 100644
--- a/autoload/nim.vim
+++ b/autoload/nim.vim
@@ -23,8 +23,8 @@ fun! nim#init() abort
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 = json_decode(raw_dumpdata)
+
let b:nim_project_root = dumpdata['project_path']
let b:nim_defined_symbols = dumpdata['defined_symbols']
let b:nim_caas_enabled = g:nim_caas_enabled || index(dumpdata['defined_symbols'], 'forcecaas') != -1
@@ -211,7 +211,9 @@ fun! GotoDefinition_nim_ready(def_output) abort
let defBits = split(rawDef, '\t')
let file = defBits[4]
let line = defBits[5]
+ let column = defBits[6]
exe printf('e +%d %s', line, file)
+ call cursor(line, column + 1)
return 1
endf