SpontanCombust / witcherscript-ide

Language Server implementation for WitcherScript - Witcher 3's scripting language.
https://spontancombust.github.io/witcherscript-ide/
Apache License 2.0
10 stars 0 forks source link

[FEATURE] Improve manifest TOML parsing diagnostics #34

Open SpontanCombust opened 4 months ago

SpontanCombust commented 4 months ago

Some diagnostics generated by the LSP when parsing manifest files are not useful to the user. For example, specifying a dependency like this:

content0 = { paths = "../content0" } #mind the typo "paths" instead of "path"

Will produce an error like this:

TOML file parsing error: TOML parse error at line 11, column 8
   |
11 | content0 = { paths = "../content0" }
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
data did not match any variant of untagged enum DependencyValue

It is safe to say that use would have no idea what to do about this "untagged enum DependencyValue".

The error should rather say something along the lines of

"path" key not found