Closed kaushalmodi closed 7 years ago
The Invalid face issue discussion moved to a separate issue: https://github.com/nim-lang/nim-mode/issues/161
This issue does in fact become the exact same as https://github.com/nim-lang/nim-mode/issues/154 if I remove the {. noSideEffect .}
pragma from the code:
proc sum(x, y:int): int =
echo x # causes side effect
x + y
echo sum(2,3)
This is probably related to https://github.com/nim-lang/nim-mode/issues/154 but am not 100% sure.
For this simple code where I was experimenting with
noSideEffect
:I get this in the *Messages* buffer instead of having that error show up in *Flycheck errors* buffer.
*Messages*
buffer?proc sum(x, y:int): int {. noSideEffect .} =
.nimsuggest-mode
, because I removednimsuggest-mode
fromnim-mode-hook
, and also verified that the value ofnimsuggest-mode
then showednil
, and the value ofnim-mode-hook
was'(flycheck-mode nim-capf-setup nlinum-mode)
.Some more digging:
nimsuggest-mode
andflycheck-mode
enabled, I get:nimsuggest-mode
disabled, the invalid face reference issue goes away but the earlier error still show up.flycheck-mode
disabled too, all errors go away.So the problem is somewhere in flycheck-nimsuggest.el.