Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.nims files get incorrent errors #41

Closed
dawkot opened this issue May 30, 2021 · 4 comments
Closed

.nims files get incorrent errors #41

dawkot opened this issue May 30, 2021 · 4 comments

Comments

@dawkot
Copy link

dawkot commented May 30, 2021

It would be better not to check .nims files at all if it can't be immediately fixed.

Example

Editor will complain that procedure setCommand doesn't exist in a .nims file if we try to call it, even though it obviously does.

@binhonglee
Copy link

Porting this issue over as well since it is also nimscript related.

@saem
Copy link
Owner

saem commented Jul 4, 2021

Sorry, I can't replicate this issue.

@saem saem closed this as completed Jul 4, 2021
@binhonglee
Copy link

Hey @saem, I have a repro step.

  1. Clone https://github.com/binhonglee/wings
  2. Open up src/main/scripts/preCompile.nims
  3. Hit save

Unintended effect:

  1. Underlines mode as an undeclared identifier
  2. See a const.nim file created at the top level of the project directory.

@saem
Copy link
Owner

saem commented Jul 7, 2021

@binhonglee thanks for the reproduction, that's not the same error or maybe it is, in which case it's it's not really a problem.

In this case there is one thing to do, create a nim.project setting in .vscode/setting.json with an array of Nim file(s) that you actually compile. I think Nim check won't kick off for it anymore.

If that doesn't work the other issue, which is a nim issue, is that Nim check needs a Nim cfg file in the top level directory with the path specified as . or it won't know about the const.nim file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants