lsp/cache: completions must not return null items list
The spec for completions does not permit JSON `null` for
`CompletionList.items`. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionList
However, in the case that we have no completions to offer, we were
sending a `null` value, which was causing issues with some editors,
such as intellij.
I've checked the other LSP features we support and I don't believe we
suffer from this elsewhere.
Change-Id: I69044a20d8d79f56a795681c588a976b6401dc28
Signed-off-by: Matthew Sackman <matthew@cue.works>
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1231226
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>