zls should resolve relative paths for didChangeConfiguration
#2288 was rejected because eg this .zed/settings.json file should be supported:
{
"lsp": {
"zls": {
"settings": {
"zig_lib_path": "./zig/lib"
}
}
}
}
however, the above configuration causes zls to fallback to the default zig lib path from zig env since ./zig/lib is relative. as a result, zls logs the following:
config option 'zig_lib_path': expected absolute path but got './zig/lib'
i'm already working on a PR for this, but i'm not sure the preferred way to handle multiple workspace roots? @Techatrix
the workspace/didChangeConfiguration notification doesn't seem to indicate which workspace to apply the given settings to, so should the setting apply to each workspace root?
Receiving configuration values through workspace/didChangeConfiguration is part of the older "push model" that has been mostly replaced by the "pull model" with workspace/configuration. The latter has the ability to request config values for a specific "scope" with the scopeUri property. This should make it possible to support multiple workspace folders with different configuration even though ZLS's config system doesn't currently support this (and most editors except VS Code). Since multiple workspace roots are a rare occurrence, this issue can still be addressed by only implementing this feature when there is a single workspace folder and logging a warning in multi workspace setups.