Solargraph: Work over stdio?

Created on 7 Jun 2018  路  14Comments  路  Source: castwide/solargraph

Hey! This is awesome! I'm using https://github.com/onivim/oni and would love to use this with it, but Oni only supports stdio for language servers at the moment: could you make solargraph work over stdio as well as it's current TCP setup? My naive self tells me this should be relatively trivial to impliment.

enhancement

Most helpful comment

Thanks!

A stdio transport is on the roadmap; in fact, it was the first transport I expected to deliver. I switched to TCP because I was able to get better performance out of it. I'll revisit the stdio implementation and post updates in this issue.

All 14 comments

Thanks!

A stdio transport is on the roadmap; in fact, it was the first transport I expected to deliver. I switched to TCP because I was able to get better performance out of it. I'll revisit the stdio implementation and post updates in this issue.

this would be grand! thanks @castwide

I have just submitted an issue to Oni for TCP support ; I had been looking for something like Oni for years - I just found out about it yesterday! Having it work with Solargarph would be amazing!

The stdio branch includes a working implementation of the stdio transport. Run solargraph stdio to start the server. The performance issues I encountered in my earlier experiments appear to be largely resolved here. I haven't benchmarked it, but its performance "feels" very close to the socket server.

I encourage client developers to clone/fork it and give it a try. Barring major bugs, I expect to publish it in gem version 0.23 or 0.24.

The stdio branch is merged into master.

thanks @castwide will the gemspec be updated and the update get published to rubygems in the next couple days?

@megalithic I expect to publish it by Monday (July 2) at the latest.

Published gem v0.23.0. Clients using stdio should run solargraph stdio.

Guys, has anyone been able to get suggestions? Oni shows that Ruby has connected to language server; hovering over a class name shows me data. However, when I do [1,2,3]. , I do not get any suggestions.

  "language.ruby.languageServer.command": "solargraph",
  "language.ruby.languageServer.arguments": [
    "stdio",
  ],

It seems that the first time I open the file, I am able to get some completion on Arrays; this is what the developer tools console is showing:

Request completionItem/resolve

After the first use, I start getting Request textDocument/completion (which does not trigger anything)

@zxiest Yes, I've got suggestions using LanguageClient-neovim with this setting:

let g:LanguageClient_serverCommands = {
            \ 'ruby': [ 'solargraph',  'stdio' ],
            \ }

I don't use Oni though, so can't help you there, sorry.

@devinalvaro Can you post a full vimrc/init.vim? I can't get it to work in multiple async complete plugins.

@bbtdev Sure, here it is https://pastebin.com/kUj551nv.

Gem version 0.24.0 fixes a bug that affected some clients using the stdio transport. More information: https://github.com/castwide/solargraph/issues/79

If anyone has any problems using the stdio transport, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

siumennel picture siumennel  路  5Comments

taylorthurlow picture taylorthurlow  路  4Comments

cuongn265 picture cuongn265  路  3Comments

castwide picture castwide  路  3Comments

dgutov picture dgutov  路  5Comments