Closed arashm closed 3 years ago
Confirmed. I'll work on a fix for a patch release.
Fixed in gem v0.40.4.
Not sure what's the correct behavior, but my expectation when I'm after the last ::
is to get the definition for Clients::Registrations::Request
, but with this fix, I'm getting the definitions for Clients::Registrations
. This is a bit confusing specially with vim mode (or in VIM itself), the cursor would look like this:
Here if I look for the definition, I get Clients::Registrations
, if I move it 1 character and hover e
, then I get Request
.
Gotcha. It still occurs after the second nested namespace. From Clients::
, it correctly goes to the definition for Clients::Registrations
; but from Clients::Registrations::
, it finds Clients::Registrations
instead of Clients::Registrations::Requests
. I'll work on another fix.
Fixed in gem v0.41.0.
Well it's weird now. I'm using v0.41.1
and nothing works in VIM using coc plugin. It's like the project is not scanned at all by Solargraph and it always return definition was not found. Yet I can't reproduce the issue in VSCode and it seems the first call to solargraph, scans the project and works just fine.
Not sure if it's an issue with coc-solargraph or solargraph itself. Got any advise?
Ignore me. I think it works fine and if I noticed something, I'll open a new bug report. Thank you very much for the great work!
Having a class defined like this
Clients::Registrations::Request.new
, if I put my courser just beforeR
and after::
ofRequest
part, and select "go to definition", it won't find the definition. If I put the cursor on any other character after the first one, it works fine.Looking at the logs, it seems like the plugin is sending the request to Solargraph server, one character before the one I have my cursor on.