japhib / pico8-ls

PICO-8 Language Server
MIT License
69 stars 8 forks source link

Definition/usages lookup table unavailable for <file> #20

Closed scambier closed 2 years ago

scambier commented 2 years ago

The extension stopped working for me a few months ago, I think when you released 0.4.1.

Here's the verbose trace when I "Go to definition" on a global var:

[Trace - 17:41:31] Sending request 'textDocument/definition - (40)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/username/AppData/Roaming/pico-8/carts/somegame/bg.lua"
    },
    "position": {
        "line": 10,
        "character": 29
    }
}

Definition/usages lookup table unavailable for file:///c%3A/Users/username/AppData/Roaming/pico-8/carts/somegame/bg.lua
[Trace - 17:41:31] Received response 'textDocument/definition - (40)' in 0ms.
Result: []
japhib commented 2 years ago

If you open View -> Output and change the dropdown to show output from PICO-8 LS, what logs does it show?

scambier commented 2 years ago

What I pasted on the first post comes from the Output view

PICO-8 Language Server starting.
PICO-8 Language Server launched.
Definition/usages lookup table unavailable for file:///c%3A/Users/username/AppData/Roaming/pico-8/carts/somegame/bg.lua
Definition/usages lookup table unavailable for file:///c%3A/Users/username/AppData/Roaming/pico-8/carts/somegame/board.lua

FWIW, I also had to do a clean reinstallation of VSCode yesterday (for another unrelated issue), so I literally just reinstalled the plugin and still have the error.

knexator commented 2 years ago

I have the same issue - no autocompletion, "Go to definition" doesn't work. Works when downgrading to 0.4.0 (doesn't work in 0.4.1)

japhib commented 2 years ago

Just released 0.4.6 which fixes this issue. Feel free to re-open if you're still seeing the issue.