pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
238 stars 37 forks source link

Channel #166

Closed jiuker closed 5 months ago

jiuker commented 4 years ago

undeclared identifier: 'Channel'

RSDuck commented 4 years ago

please be more descriptive with your issues. The only reason we can know what you mean, is because this is a common issue.

You need to make a nimscript file for nim check and nim suggest to pickup the threads option.

serge-hulne commented 3 years ago

I've seen the same bug in vscode-nim

ghost commented 3 years ago

That's not a VSCode bug, you need to provide configuration for Nim (and Nimsuggest since it uses the compiler) for it to understand that you're actually using threads.

There are mainly 2 ways - with older .nim.cfg and newer .nims, but the syntax for simple options is the same. E.g. make a file named as1.nims or as1.nim.cfg or config.nims (that'll apply to all .nim files in the same directory) or nim.cfg (same as with config.nims but older format) with contents:

--threads:on

And then Nimsuggest will actually recognize that you're using threads.

ghost commented 3 years ago

Also yeah, as @RSDuck said this is a duplicate of https://github.com/pragmagic/vscode-nim/issues/98 and https://github.com/pragmagic/vscode-nim/issues/70 and should be closed.

serge-hulne commented 3 years ago

Thanks.

serge-hulne commented 3 years ago

I commented on the issue, I didn't raise it, but yes it should be closed.

On Thu, Jul 30, 2020 at 8:40 AM Danil Yarantsev notifications@github.com wrote:

Also yeah, as @RSDuck https://github.com/RSDuck said this is a duplicate of #98 https://github.com/pragmagic/vscode-nim/issues/98 and

70 https://github.com/pragmagic/vscode-nim/issues/70 and should be

closed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pragmagic/vscode-nim/issues/166#issuecomment-666158829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKDDWAI6JDWGMTYICHJZ3R6EIURANCNFSM4N7IKM7A .