Add baseUri to DocumentFilter
Created by: felixfbecker
This is a proper fix for both #8602 and broken codeintel for root files (Slack thread).
Codeintel extensions need to be able to scope providers to workspace roots. Doing so in pattern
does not work, because minimatch
is not built for working with URIs (in particular it broke for files in the root).
Considering all options, I decided to go with this solution. Alternatives considered:
- Making
pattern
work for URIs- This is ambiguous with percent-encoding
- Adding explicit filters for repository and revision
- This is more cumbersome for lsp-client, which wants to scope to the root URI
- Not clearly defined in editors with
file:///
URIs
- A
uriPattern
property- More complex, no direct use case