Skip to content

Conversation

@sparr
Copy link
Contributor

@sparr sparr commented Oct 8, 2024

Microsoft's build of VSCode uses ~/.config/Code on Linux. Popular alternate builds VSCodium and Code - OSS use different names for their config directories. And if a distro or user compiles with an uncommon name, it could be arbitrary.

This patch checks the three named variations, then all config dirs, then produces an error.

I also had it memoize the addons path rather than search for it 3+ times during startup (once for every instance of ${addons})

This fixes the problem I ran into in LuaLS/LLS-Addons#182

@sparr sparr changed the title Handle alternate linux config directory paths Handle alternate linux config directory paths for addons Oct 8, 2024
@sparr sparr force-pushed the handle_alternate_linux_config_paths branch from cac0ae7 to a8dd55c Compare October 8, 2024 12:00
@sumneko
Copy link
Collaborator

sumneko commented Oct 8, 2024

I think addone should be sent from the client to the server, instead of having the server search for it. Custom options initialized through LSP or passed as startup parameters could be considered.

@sparr
Copy link
Contributor Author

sparr commented Oct 8, 2024

I think that would involve asking the extension's LuaClient.start() to pass context.globalStorageUri as a parameter to the language server binary. I got a bit lost trying to figure out how command line option handling works in the language server, though.

@sumneko
Copy link
Collaborator

sumneko commented Oct 8, 2024

@sparr
Copy link
Contributor Author

sparr commented Oct 8, 2024

No longer necessary with #2893 merged

@sparr sparr closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants