@@ -19,8 +19,7 @@ import * as chokidar from "chokidar";
1919import { assert } from "console" ;
2020import { fileURLToPath } from "url" ;
2121import { ChildProcess } from "child_process" ;
22- import { Location } from "vscode-languageserver" ;
23- import { SymbolInformation , WorkspaceEdit } from "vscode-languageserver" ;
22+ import { WorkspaceEdit } from "vscode-languageserver" ;
2423import { TextEdit } from "vscode-languageserver-types" ;
2524
2625// https://microsoft.github.io/language-server-protocol/specification#initialize
@@ -392,16 +391,7 @@ function onMessage(msg: m.Message) {
392391 // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rename
393392 let params = msg . params as p . RenameParams ;
394393 let filePath = fileURLToPath ( params . textDocument . uri ) ;
395- let locations : Location [ ] | null = utils . runAnalysisAfterSanityCheck (
396- filePath ,
397- [
398- "references" ,
399- filePath ,
400- params . position . line ,
401- params . position . character ,
402- ]
403- ) ;
404-
394+ let locations : p . Location [ ] | null = utils . getReferencesForPosition ( filePath , params . position ) ;
405395 let result : WorkspaceEdit | null ;
406396 if ( locations === null ) {
407397 result = null ;
@@ -430,15 +420,7 @@ function onMessage(msg: m.Message) {
430420 // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
431421 let params = msg . params as p . ReferenceParams ;
432422 let filePath = fileURLToPath ( params . textDocument . uri ) ;
433- let result : typeof p . ReferencesRequest . type = utils . runAnalysisAfterSanityCheck (
434- filePath ,
435- [
436- "references" ,
437- filePath ,
438- params . position . line ,
439- params . position . character ,
440- ]
441- ) ;
423+ let result : typeof p . ReferencesRequest . type = utils . getReferencesForPosition ( filePath , params . position ) ;
442424 let definitionResponse : m . ResponseMessage = {
443425 jsonrpc : c . jsonrpcVersion ,
444426 id : msg . id ,
0 commit comments