rszyma / vscode-kanata

Language support for kanata configuration files in VS Code
https://marketplace.visualstudio.com/items?itemName=rszyma.vscode-kanata
GNU Lesser General Public License v3.0
16 stars 0 forks source link

Unknown key in defsrc while it is defined in deflocalkeys #3

Closed Fred-Vatin closed 1 year ago

Fred-Vatin commented 1 year ago
VS Code version OS Extension version
1.82.3 Win 10 x64 pro (french) 22H2 v0.2.0

Steps to reproduce

  1. Check this config.
  2. save in VSCode

Results

[{
    "resource": "/D:/Programmes/Kanata/kanata.kbd",
    "owner": "Kanata Configuration Language",
    "severity": 8,
    "message": "Unknown key in defsrc: \"²\"",
    "source": "kanata-parser",
    "startLineNumber": 216,
    "startColumn": 3,
    "endLineNumber": 216,
    "endColumn": 4
}]

Expectations

When checking defsrc, it seems it doesn’t check in deflocalkeys-win if the key is defined.

rszyma commented 1 year ago

Thanks for the bug report!

If you want an explanation why this bug happens, take look at #1.

I don't think there's any other sensible way to fix it besides adding an extension setting to choose which deflocalkeys variant to apply. This would also require a small change in kanata-parser itself - currently, deflocalkeys variant is choosen at compile time, but we would need it to be a runtime conditional.