Description
Some clients don't support completions snippets. It can be argued that clients generally should be improved to support snippets, but
- I can imagine embedding rust-analyzer in the contexts where full snippet support does not make sense (for example, completion in the
eval
field of a debugger) - I can imagine some users might prefer simple identifier completions
So, we should support this use-case. Specifically, we should only send snippet completions if supports them.
A simplest fix here (and a good initial implemtation) is change code around here to just strip $i
snippet markers from text edit, if the client doesn't support snippets. A similar "fixup" approach is used for folding ranges.
However in general it seems like the core completion engine should just provide different completions depending on whether snippets are enable or not. This should be done via feature flags (example), and requires some design to make sure that we don't twice as much code, but still provide best possible completions with and without snippets.