Closed thatnerdjosh closed 1 year ago
@Ketho - could you help to review this?
I'm also not an experienced extension developer to be honest.
I suppose the second call of setExternalLibrary
indeed overwrites the first call. I'll look into your PR later today.
Maybe I have to reconsider what the proper way to do it is now since Sumneko might have changed that. https://github.com/LuaLS/lua-language-server/wiki/Libraries
@Ketho - ok - I do know that with the Libraries
being updated it does function as expected, but didn't look too much into it more than that. Took a while just to land on this solution :sweat_smile: :)
Thanks for looking into the issue, I probably wouldn't have the time to do that anytime soon 🙂
Lua.workspace.library
was being updated but immediately overwritten on the second call tosetExternalLibrary
. After some debugging, it seems likevscode.workspace.getConfiguration
does not reload everything from the config on the second time it is called.There is some interesting magic going on here: https://github.com/microsoft/vscode/blob/230a6266ebc8e092521a949ed159d8be23e1b1b2/src/vs/workbench/api/common/extHostConfiguration.ts#L186
Related to issue #100 - please review with scrutiny, as I am not an experienced extension developer..