vscode-nim icon indicating copy to clipboard operation
vscode-nim copied to clipboard

nim.cfg files not recognized

Open ratiotile opened this issue 5 years ago • 6 comments

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

ratiotile avatar Nov 12 '18 19:11 ratiotile

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

kosz78 avatar Nov 19 '18 14:11 kosz78

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

ratiotile avatar Nov 30 '18 03:11 ratiotile

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

kosz78 avatar Nov 30 '18 15:11 kosz78

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 avatar Dec 03 '18 05:12 ratiotile

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.

ratiotile avatar Jun 01 '19 23:06 ratiotile

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.

exelotl avatar Jan 05 '20 01:01 exelotl