overextended / cfxlua-vscode

https://marketplace.visualstudio.com/items?itemName=overextended.cfxlua-vscode
MIT License
50 stars 23 forks source link

Global/workspace Lua.workspace.library is merged with folder settings #23

Open Kaktus2225 opened 1 year ago

Kaktus2225 commented 1 year ago

When I set a path in Lua.workspace.library in workspace settings, it is copied by the extension (after restart) to user settings and only one of the natives is added (instead of three).

Kaktus2225 commented 1 year ago

Now it works when there is a .code-workspace file, but when there is only settings.json is the same issue.

thelindat commented 1 year ago

https://code.visualstudio.com/api/references/vscode-api#WorkspaceConfiguration

Represents the configuration. It is a merged view of Default Settings Global (User) Settings Workspace settings Workspace Folder settings - From one of the Workspace Folders under which requested resource belongs to. Language settings - Settings defined under requested language.

So I can only get a merged config object, but I can save to either global, workspace, or workspace folder. There's no way for me to check where the setting came from, and I cannot splice or push to an array of settings directly - only modify and update the merged object.

I have no clue how I'm supposed to resolve this.

D4isDAVID commented 1 year ago

I have no clue how I'm supposed to resolve this.

You should consider getting added to LuaLS/LLS-Addons.

thelindat commented 1 year ago

I have no clue how I'm supposed to resolve this.

You should consider getting added to LuaLS/LLS-Addons.

Doesn't really solve anything and is less visible to users.

D4isDAVID commented 1 year ago

Doesn't really solve anything and is less visible to users.

It would solve you having to mess with user settings in weird ways, since iirc addons don't write to the user's settings files Not accurate I guess.

thelindat commented 1 year ago

~It would solve you having to mess with user settings in weird ways, since iirc addons don't write to the user's settings files~ Not accurate I guess.

Somehow only just saw this response but yeah it will still update user/workspace/folder settings.

I'm still, for some reason, holding out hope that Cfx do their own extension or LLS addon even though the issue is dead; so doing the addon myself would feel a bit awkward.