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

Incorrect configuration schema

Open rotu opened this issue 3 years ago • 1 comments

In this project, nim.projectMapping is defined as an object: https://github.com/saem/vscode-nim/blob/a937ed1eca0b81c93b3f6c5dcbbc9c9eb5e2a8de/package.json#L202-L207

But in the language server, it's defined as a sequence/list: https://github.com/nim-lang/langserver/blob/4878cbce6fb0b097f2dcef7cd6d3e5d494bf278a/nimlangserver.nim#L22 https://github.com/nim-lang/langserver/blob/3fcf4c87904ec691ebca035872a4913000fa85df/README.md?plain=1#L40-L44

This mismatch causes either:

  • the settings editor to complain "Incorrect type. Expected "object"."
  • the nim langage server to ignore the configuration with "DBG Failed to parse the configuration." and seemingly not work at all. There also seem to be other error messages like "A request has failed. See the output for more information."

This should be corrected and a more descriptive error message should happen when the config is broken.

rotu avatar Oct 09 '22 18:10 rotu

Possibly responsible for:

https://github.com/saem/vscode-nim/issues/102 https://github.com/saem/vscode-nim/issues/103

rotu avatar Oct 09 '22 18:10 rotu