summary refs log tree commit diff stats
path: root/nimsuggest/nimsuggest.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-05-14 13:04:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-05-14 13:04:18 +0200
commit1616c6e0297efd09000c4286d1fdfc986ee1ab7a (patch)
tree2f476475a340b22a92e1ad20761a2ecff95adcdf /nimsuggest/nimsuggest.nim
parent328e7a100560e5bd179512ba142ef944bf0a0698 (diff)
downloadNim-1616c6e0297efd09000c4286d1fdfc986ee1ab7a.tar.gz
make nimsuggest compile again
Diffstat (limited to 'nimsuggest/nimsuggest.nim')
-rw-r--r--nimsuggest/nimsuggest.nim20
1 files changed, 10 insertions, 10 deletions
diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim
index bbb751ba6..5c505ddf7 100644
--- a/nimsuggest/nimsuggest.nim
+++ b/nimsuggest/nimsuggest.nim
@@ -195,7 +195,7 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int;
   if conf.ideCmd in {ideUse, ideDus}:
     let u = if suggestVersion != 1: graph.symFromInfo(gTrackPos) else: graph.usageSym
     if u != nil:
-      listUsages(u)
+      listUsages(conf, u)
     else:
       localError(conf, gTrackPos, "found no symbol at this position " & $gTrackPos)
 
@@ -385,10 +385,10 @@ proc execCmd(cmd: string; graph: ModuleGraph; cache: IdentCache; cachedMsgs: Cac
     results.send(Suggest(section: ideNone))
 
   template toggle(sw) =
-    if sw in gGlobalOptions:
-      excl(gGlobalOptions, sw)
+    if sw in conf.globalOptions:
+      excl(conf.globalOptions, sw)
     else:
-      incl(gGlobalOptions, sw)
+      incl(conf.globalOptions, sw)
     sentinel()
     return
 
@@ -490,8 +490,8 @@ proc mainCommand(graph: ModuleGraph; cache: IdentCache) =
   clearPasses()
   registerPass verbosePass
   registerPass semPass
-  gCmd = cmdIdeTools
-  incl gGlobalOptions, optCaasEnabled
+  conf.cmd = cmdIdeTools
+  incl conf.globalOptions, optCaasEnabled
   wantMainModule(conf)
 
   if not fileExists(conf.projectFull):
@@ -546,15 +546,15 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string; conf: ConfigRef) =
       of "cmdsug":
         gMode = mcmdsug
         gAddress = p.val
-        incl(gGlobalOptions, optIdeDebug)
+        incl(conf.globalOptions, optIdeDebug)
       of "cmdcon":
         gMode = mcmdcon
         gAddress = p.val
-        incl(gGlobalOptions, optIdeDebug)
+        incl(conf.globalOptions, optIdeDebug)
       of "epc":
         gMode = mepc
-        gVerbosity = 0          # Port number gotta be first.
-      of "debug": incl(gGlobalOptions, optIdeDebug)
+        conf.verbosity = 0          # Port number gotta be first.
+      of "debug": incl(conf.globalOptions, optIdeDebug)
       of "v2": suggestVersion = 0
       of "v1": suggestVersion = 1
       of "tester":