Go To Definition not working as expected

Hey everyone,

I’m working on an Extension for Ruby Solargraph. I’ve got so far as to get the LanguageClient started. Some features, such as “Hover”, are working nicely. However, Go to Definition isn’t working correctly – definitions within the same file are jumped to, but anything outside of the current file doesn’t work.

Am I missing something? Could someone point me in the right direction?

It’s been working alright for my TypeScript extension. Have you confirmed that it’s following the LSP spec in the solargraph language server? (is it providing the correct file uris?)

I ended up debugging a few issues by introducing a run script in between my extension code and the language server so I could pipe the server’s output to a log for inspection.

Thanks Cameron. I’m actually using your TypeScript extension (thanks for your work on it!), so I’ll try to copy your run script idea and see if the server is working correctly.

Interestingly, the VS Code Solargraph extension works just fine with the same Solargraph configuration. Not sure if they’re doing anything differently over there.

@apexskier Looks like you were right. The solargraph server is just not returning any results. Interestingly, without any extensions, Nova itself does a better job.

Yes, thanks for all of your work @apexskier! I have also used some of your extensions for reference.

1 Like

Hi @jonathanpike. Thank you for working on this extension! Do you have a public repo? I would love to follow along.

Hi Jason, I’ve just pushed up an initial commit for now. More as soon as I figure out what’s wrong with the language server (or whatever I’ve done :D): https://github.com/jonathanpike/nova-solargraph

Thanks @jonathanpike. I just followed the repo. Please let me know if there is anything I can do to help. I have zero experience with language servers, but willing to help where I can…maybe testing.