castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.9k stars 157 forks source link

Relation with Sorbet #194

Open sunnyrjuneja opened 5 years ago

sunnyrjuneja commented 5 years ago

Hello castwide! Big fan of this gem and been using it quite often. I'm curious, now that Sorbet is public, do you see any relationship between Sorbet / Solargraph?

https://sorbet.org/blog/2019/06/20/open-sourcing-sorbet

castwide commented 5 years ago

Thanks!

Sorbet came to my attention a few months ago. Glad to see they've started open-sourcing it. A relationship between Sorbet and Solargraph is definitely a possibility. Some of the features overlap, and they have lots of potential to complement each other. A few preliminary thoughts:

sunnyrjuneja commented 5 years ago

@castwide great answer! i've been doing some more investigation myself and it feels the ecosystem around sorbet is pretty minimal (for example, i can't find any editor plugins). you've obviously done a fantastic job of developer ux so i hope there's a bit of overlap between the projects.

Also, I know you're working on rails integration (#87) here's some tooling around rails / sorbet coming out: https://github.com/chanzuckerberg/sorbet-rails.

DarkDimius commented 5 years ago

@sunnyrjuneja Sorbet actually has a LSP server inside it(pass --lsp on the command line) and thus should be easy to integrate if you were to try! Note that many lsp features are disabled by default and need to be enabled via command line flags(srb tc --help will show them all)

DarkDimius commented 5 years ago

Editor plugin exists but it's currently closed source. It will get open-sourced when we stabilize LSP features.

minkir014 commented 5 years ago

@DarkDimius Is there a plugin for vs code???

sunnyrjuneja commented 5 years ago

@DarkDimius Thank you for the update! Looking forward to the open sourcing of the editor features. My CTO and I are already working on integrating Sorbet into our Rails application.

I've been closely tracking Twitter for updates on Sorbet and am extremely excited about the work you've released today. I'm so grateful for you and your team's hard work.

minkir014 commented 5 years ago

@DarkDimius Are you here? Please answer my question above.

sunnyrjuneja commented 5 years ago

@minkir014 he answered your question, it's coming soon.

connorshea commented 5 years ago

@castwide FWIW, Sord is a tool for translating YARD docs into Sorbet signatures (and it works pretty well already): https://github.com/AaronC81/sord

It only works in one direction, though.

guledali commented 4 years ago

Man I which there was a way of converting rbi or Sorbet signatures files into YARD.

amake commented 4 years ago

I have been using Solargraph with Emacs's lsp-mode for a while and it's really great. Thank you for your hard work.

My team is now evaluating typechecking packages, and obviously Sorbet and Solargraph are on our list.

I am curious about the future of Solargraph's typechecking in light of the recent news about Ruby 3's type signature language: https://developer.squareup.com/blog/the-state-of-ruby-3-typing/

I feel like I understand the roadmap for Sorbet and how it will fit into the bigger picture, but what about Solargraph? Are there plans to work with RBS in the future?

(Personally I like Solargraph's current YARD approach: it's unintrusive yet still readily visible, and an extension of what we were already doing. But it could be a tough sell for my org to double-down on this approach if external type definitions are truly the way of the future.)

castwide commented 4 years ago

@amake It definitely makes sense to support RBS if/when it becomes part of the Ruby standard, but I'm still not sure what form it should take. A few considerations:

alexrecuenco commented 2 months ago

The last update here was in 2020. I wonder if there any updates worth sharing in terms of the status of solargraph's RBS support at the moment

Since we have this on the README now

As of version 0.49.0, Solargraph uses rbs for core and stdlib documentation. The following only applies to prior versions.