pragmagic / vscode-nim

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

nim.cfg files not recognized #107

Open ratiotile opened 5 years ago

ratiotile commented 5 years ago

Project-level nim.cfg files should be recognized as config files. Error squiggles should not be showing up. vscode-nim-cfg-not-recognized vscode-nim 0.6.1 Fresh install of vs code 1.28.2 nim 0.19.0

kosz78 commented 5 years ago

@ratiotile these errors produced by nim check <project.nim> command, it seems You have incorrect config file

ratiotile commented 5 years ago

The syntax is correct because the nim compiler recognizes the arguments and compiles the project correctly.

kosz78 commented 5 years ago

Could you please execute nim check <project.nim> command and shows output?

ratiotile commented 5 years ago

To clarify, I have 2 levels of config files in my project: the project-level nim.cfg with settings global to the project and separate <main.nim.cfg> files for each entry point. The error squiggles only show up on the nim.cfg file.

nim check src\module_dll.nim shows:

Hint: used config file 'C:\Nim\config\nim.cfg' [Conf]
Hint: used config file '<...>\src\nim.cfg' [Conf]
Hint: used config file '<...>\src\module_dll.nim.cfg' [Conf]
ratiotile commented 5 years ago

nim check is intended to work on .nim source files, not the nim.cfg. The config file syntax is different.

VsCode should not be running nim check on *.cfg files.

exelotl commented 4 years ago

This is also an issue with nimscript files (which typically fill the same role as .cfg files)

image

Unless there is some way to make nim check understand the default nimscript environment, I think both *.cfg and *.nims files should not be checked.