pragmagic / vscode-nim

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

Lint on save inexplicably doesn't work #170

Open ghost opened 3 years ago

ghost commented 3 years ago

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 commented 3 years ago

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