diff options
author | Simon Hafner <hafnersimon@gmail.com> | 2015-05-08 04:45:48 +0500 |
---|---|---|
committer | Simon Hafner <hafnersimon@gmail.com> | 2015-05-08 06:32:58 +0500 |
commit | 2474c1bb111b38ddef64659c893722b357a27384 (patch) | |
tree | cf3542e29cc01c4618df1acf89406a6d898c2a12 /compiler/nimsuggest/nimsuggest.nim | |
parent | 1e78c5445d2d2bd7cc5f39579dd8ff0f8bbcb65c (diff) | |
download | Nim-2474c1bb111b38ddef64659c893722b357a27384.tar.gz |
import sigmatch, not suggest in nimsuggest
Diffstat (limited to 'compiler/nimsuggest/nimsuggest.nim')
-rw-r--r-- | compiler/nimsuggest/nimsuggest.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/nimsuggest/nimsuggest.nim b/compiler/nimsuggest/nimsuggest.nim index 3f8943016..7ba3379c3 100644 --- a/compiler/nimsuggest/nimsuggest.nim +++ b/compiler/nimsuggest/nimsuggest.nim @@ -10,8 +10,11 @@ ## Nimsuggest is a tool that helps to give editors IDE like capabilities. import strutils, os, parseopt, parseutils, sequtils, net +# Do NOT import suggest. It will lead to wierd bugs with +# suggestionResultHook, because suggest.nim is included by sigmatch. +# So we import that one instead. import options, commands, modules, sem, passes, passaux, msgs, nimconf, - extccomp, condsyms, lists, net, rdstdin, sexp, suggest, ast + extccomp, condsyms, lists, net, rdstdin, sexp, sigmatch, ast when defined(windows): import winlean @@ -116,7 +119,6 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int) = resetModule gProjectMainIdx gTrackPos = newLineInfo(dirtyIdx, line, col) - #echo dirtyfile, gDirtyBufferIdx, " project ", gProjectMainIdx gErrorCounter = 0 if not isKnownFile: compileProject(dirtyIdx) @@ -245,7 +247,7 @@ proc serve() = case messageType: of "call": var results: seq[Suggest] = @[] - suggest.suggestionResultHook = proc (s: Suggest) = + suggestionResultHook = proc (s: Suggest) = results.add(s) let |