Ketho / vscode-wow-api

VS Code extension for World of Warcraft AddOns
https://marketplace.visualstudio.com/items?itemName=ketho.wow-api
MIT License
151 stars 33 forks source link

Cannot clean up EmmyLua from Sumneko's libraries path on uninstall #20

Closed Ketho closed 1 year ago

Ketho commented 2 years ago

Uninstalling the extension does not appear to work, starting somewhere around the August 2021 vscode release. It relied on vscode deleting the actual extension files instead of marking them in:

C:\Users\<user>\.vscode\extensions\.obsolete

Removing them from Sumneko's external libraries path does not seem possible when uninstalling, since we don't have access to the vscode api in the uninstall hook.

ChrisKader commented 2 years ago

It seems the options are pretty limited as there is no notification to the extension that's its being uninstalled while also providing access to an API that makes it possible to remediate extension settings.

ChrisKader commented 2 years ago

It may be good if Sumneko's Language Server exposed an API or command for adding/removing library paths (instead of requiring that extensions update its config to add them).

As it currently stands, there is no way to update the config of Sumneko's Language Server extension to remove added library paths (and there does not appear to be any plan to support such a feature that would allow for that to happen).

However, if Sumneko's extension exposed an API or command (both possible for a VS code extension to do) for adding/removing library paths then vscode-wow-api could invoke that API or command on activation and deactivation.

Ketho commented 2 years ago

Then I should probably make a ticket at least for Sumneko explaining my issue. But I'm not sure if this is something they would want to spend dev time on possible solutions like an API for plugin extensions like this one.

ChrisKader commented 2 years ago

At high level this appears to be a best practice as its done by other language server extensions for embedded languages. This type of API would also provide the benefit of being able to more efficiently load libraries. I dont think he should remove the ability to provide a path to libraries in his extension. I do believe that this API should be an option though, since its one that is implemented by other language servers and even the one built into VS Code.

Ketho commented 1 year ago

The extension files get cleaned up (since a year I guess)