When we run completion in VSCode, the following things happen:
- Get get a completion request for a.f^
- clangd returns a completion item with the range a[[.f]], insert text ->foo and filter text foo
- VSCode extracts the word against which we should filter from a range and gets .f
- VSCode tries to match our filter text foo against the word .f and findsno match
As a result, the item we returned gets filtered out and not shown in the UI.
This revision changes the filter text to be .foo and VSCode stops filtering it out.