fsprojects / fsharp-language-server

Other
219 stars 37 forks source link

Cannot find references when selecting a whole identifier #16

Closed alfonsogarciacaro closed 6 years ago

alfonsogarciacaro commented 6 years ago

If I have the cursor in and identifier and then select "Find All references" it works as expected. But if I select the full identifier (e.g. by double-clicking) no reference is found. The error in the trace is:

[Trace - 10:55:24 PM] Sending request 'textDocument/references - (353)'.
No identifier at 8 in line '    let processRequest(request: Request): Async<string option> = '
georgewfraser commented 6 years ago

I think there may be an off-by-one error somewhere in the cursor-position logic, I have observed that it can be hard to get tooltips on 1-character identifiers. This might be the same problem.