Code intel: fix merging of locations
Created by: chrismwendt
Previously, if an extension emitted from a references provider the locations [A, B]
then [C]
, the references panel would show [C, B]
because it did component-wise merging of the arrays. This blames to https://github.com/sourcegraph/sourcegraph/pull/2271/files#diff-a156849c8d06dcc9cd46e215d155d5bdR101
Now, the entire array is replaced when a references provider emits.
I ran into this while implementing fallback to basic-code-intel if the language server takes >Nms to return references.