Generalize `configSection` to a list
As far as I understand, the current version supports either empty string here (give me all configuration), or a name, in which case you'd get one section.
I run into a situation where it would be convenient to request more than one section, even though this is probably not all that common. Concretely, I was working on a plug-in that processes some C files, and I wanted to also be able to access the configuration of another C plugin (I know that's not going to work if the other plugin is not installed, but for my use case it is reasonable to assume that it is).
My request would be to either change the type to a list of Text, or if we want to be somewhat backward compatible, have a way to specify multiple sections in the string (e.g., ; separated).
I'm not that worried about backwards compatibility, but we need to think about how this works with lsp's config updates, since it mostly assumes that you have a single config object of some known type. I guess your config object just might depend on multiple config sections?
Yeah, my current workaround is to provide the empty string, so I get the configuration for all plugins, and I adjusted my configuration parsing code to extract the relevant sections.
I was envisioning something similar, except you'd get only the sections you subscribed to rather than all of them. This should be more efficient, but it might also help with resilience if some unused sections are malformed---we were running into issues on one of our devs' machines, where the configuration of an unrelated extension was causing the whole configuration to fail. The problem was something to do with unicode characters, and it wasn't clear if this was a problem with the LSP server (perhaps the handles are not set to the correct mode?) or that particular machine, as we didn't have time to investigate further. I'll file a separate issue if we do identify an LSP related problem.
Yikes. Generally speaking the whole configuration model is woefully under-specified, so I've been sort of assuming that people are just going to stick to a configuration section that they control. But evidently not!
I think this is probably not too difficult, so PRs welcome if I don't get to it soon.