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

Lint on save inexplicably doesn't work #170

Open
ghost opened this issue Aug 13, 2020 · 1 comment
Open

Lint on save inexplicably doesn't work #170

ghost opened this issue Aug 13, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 13, 2020

Linting for Nim does not work at all. All other linting from other extensions in VS Code works. Yesterday it worked fine with all the plugins installed, but today no matter what I do nothing seems to make it work. I tried reinstalling the plugin, disabling all other plugins, deleting all the VS Code Nim files from the extensions folder, and even restarting my computer. Running Nim: Check Nim project from the command palette surprisingly does nothing at all, at least seemingly.

For example, here, there should be linting showing type mismatch:

let test = 2
let stuff = "stuff"
proc addTogether(a, b: int): int =
  a + b
addTogether(test, stuff)

Screenshot

Yet nothing shows up in VS Code. Running nim check "path/to/test.nim" highlights the expected issue without problem:

/path/to/test.nim(5, 12) Error: type mismatch: got <int, string>
but expected one of: 
proc addTogether(a, b: int): int
  first type mismatch at position: 2
  required type for b: int
  but expression 'stuff' is of type: string

expression: addTogether(test, stuff)
/path/to/test.nim(3, 6) Hint: 'addTogether' is declared but not used [XDeclaredButNotUsed]

I am running Linux 5.7.14-200.fc32.x86_64 x86_64 on Fedora release 32. My VS Code version:

code --version
1.47.3
91899dcef7b8110878ea59626991a18c8a6a1b3e
x64

VS Code settings.json:

{
    "workbench.colorTheme": "Better Solarized Dark",
    "editor.fontFamily": "'Fira Code', 'Source Code Pro', monospace",
    "files.autoSaveDelay": 250,
    "files.autoSave": "afterDelay",
    "editor.tabSize": 2,
    "editor.wordWrapColumn": 120,
    "editor.wordWrap": "wordWrapColumn",
    "workbench.iconTheme": "material-icon-theme",
    "editor.fontLigatures": true,
    "git.autofetch": true
}

Nim version:

nim --version
Nim Compiler Version 1.0.4 [Linux: amd64]
Compiled at 2020-01-29
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release -d:useLinenoise
@ITwrx
Copy link

ITwrx commented Oct 20, 2020

Doesn't work for me either. Using fedora 32 here too, but with Nim 1.4.0.

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

1 participant