PhilippeChab / nwscript-ee-language-server

A NWScript Language Server.
https://marketplace.visualstudio.com/items?itemName=PhilippeChab.nwscript-ee-language-server
MIT License
20 stars 7 forks source link

2.0.0 Intermittently Stops Working #51

Closed summonFox closed 1 year ago

summonFox commented 1 year ago

2.0.0 intermittently stops working for me.

Sometimes the LSP seemingly does not start after opening vscode and opening a nwscript file. Other times, it will start but after a while of use (anywhere from a few minutes to a few hours), hover information will say "Loading...", and compiling, diagnostics, auto completion, signature help/intellisense, goto definition all stop working. This happens regardless whether I'm only working in a single nwscript file with no includes, or working in a large module project with thousands (~3,300) custom scripts.

The only temporary fix I've found is to restart vscode, where it'll sometimes begin working only to again stop working after a few minutes to a few hours.

I'm not terribly experienced with LSPs or vscode extensions, so I'm not sure where to find the logs for this.

My settings if relevant,

"nwscript-ee-lsp.autoCompleteFunctionsWithParams": true,
    "nwscript-ee-lsp.includeCommentsInFunctionsHover": true,
    "nwscript-ee-lsp.formatter": {
        "enabled": false
    },
    "nwscript-ee-lsp.compiler": {
        "enabled": true,
        "verbose": true,
        "nwnHome": "N:\\Games\\Neverwinter Nights",
        "nwnInstallation": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Neverwinter Nights",
        "reportWarnings": true
    }

For now I've reverted back to 1.5.5.

PhilippeChab commented 1 year ago

Hey!

Sorry to hear about this. Do you see anything in the output window of the extension? If there is no entry for the LSP in the dropdown, it means nothing has been printed.

CleanShot 2023-04-05 at 09 42 31@2x

Also, I don't think it is the cause, but the setting includeCommentsInFunctionsHover is no longer valid, it is now hovering.addCommentsToFunctions. autoCompleteFunctionsWithParams is also completion.addParamsToFunctions.

PhilippeChab commented 1 year ago

You can also try the Developers Tools under help, see if there is anything there.

CleanShot 2023-04-05 at 09 57 53@2x

Aschent89 commented 1 year ago

@PhilippeChab

Adding to this, I am seeing an ongoing load attempting to save: image

Rolling back to v1.5.5 resolved the issue.

Here is the Dev tools log image (this is current while the 'saving' is taking place): image

PhilippeChab commented 1 year ago

While I am not 100% sure, I think the long saving time is caused by the initial indexing removal. I added it back in 2.0.2, let me know how it goes.

I have not successfully reproduced the initial problem in the issue, but it might also fix it. Worth trying 2.0.2.

summonFox commented 1 year ago

2.0.2 looks to have fixed my issue.

PhilippeChab commented 1 year ago

I think everything is back to normal. Feel free to reopen the issue if anything else arise.