We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88f1193 commit a80e4d9Copy full SHA for a80e4d9
lib/adapters/code-highlight-adapter.ts
@@ -24,11 +24,11 @@ export default class CodeHighlightAdapter {
24
serverCapabilities: ServerCapabilities,
25
editor: TextEditor,
26
position: Point
27
- ): Promise<Range[] | null> {
+ ): Promise<Range[]> {
28
assert(serverCapabilities.documentHighlightProvider, "Must have the documentHighlight capability")
29
const highlights = await connection.documentHighlight(Convert.editorToTextDocumentPositionParams(editor, position))
30
if (!highlights) {
31
- return null
+ return []
32
}
33
return highlights.map((highlight) => {
34
return Convert.lsRangeToAtomRange(highlight.range)
0 commit comments