Skip to content

Instantly share code, notes, and snippets.

@iftheshoefritz
Created February 25, 2022 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iftheshoefritz/8e522fbe36476267c9fd5917a6799378 to your computer and use it in GitHub Desktop.
Save iftheshoefritz/8e522fbe36476267c9fd5917a6799378 to your computer and use it in GitHub Desktop.

Railsconf 2022 CFP: LSP and Solargraph

Title

Autocomplete is for Ruby too!

Abstract

A concise, engaging description for the public program. Limited to 600 characters.

Do you have editor-envy when you witness other programmers using fancy IDE features like go-to-definition or auto-complete? Perhaps you've only witnessed this with other languages - maybe those with static typing - but that's not how it has to be.

Powerful - albeit sometimes obscure - open source tools with all these features are available for Ruby. Come hear more! I'll explain the building blocks of code intellisense features; something called Language Server Protocol; a Ruby language server called Solargraph; the solargraph-rails gem; and how you can get involved to make them even better.

Details

This content will only be visible to the review committee. Include any pertinent details such as outlines, outcomes or intended audience.

This is not just a "here's the YAML you write to add intellisense to your workflow" talk. This is about explaining how intellisense tooling works and how it can be accessed, in order to empower a community that believes that good tooling is for other languages.

Outcomes:

  • Expand horizons about in-editor tooling for Ruby (good tooling is not just for typescript)
  • Dispel myths about intellisense and static typing: types are helpful but not the only avenue for analysis; we can consider inference, structured documentation, and convention too.
  • Identify the building blocks of intellisense tooling: parsing, in-memory abstractions to represent code, protocol to answer questions from editors, editor plugins to provide developer UX
  • Explain how Language Server Protocol defines an interface that allows editor-agnostic language servers to be built
  • Inform the audience of the existence of Solargraph and how their editor already has a plugin for it
  • Explain how Solargraph's plugin ecosystem allows easy improvement
  • Introduce solargraph-rails, which aids Solargraph in understanding Rails' metaprogrammed features

Audience:

I've met many programmers recently who believe that Ruby tooling is bad and other language tooling is good. Some even think good tooling is solely a feature of one other language they've worked with, often typescript. If they knew that better tooling existed, they'd want to use it. If they understood what the building blocks are, they'd understand how to configure the less user-friendly parts; possibly even be inspired to contribute to it.

Pitch

Explain why this talk should be considered and what makes you qualified to speak on the topic.

In his RubyConf 2021 keynote, Matz explained to the community that previously, Ruby's UX improvements came from changes to the language syntax, but that going forward the UX will come from better tooling. LSP gives the Ruby community a powerful platform for users and creators of such tooling. There are really big Ruby projects already written in LSP, and we get to build on top of them. Crucially, when we improve an LSP server, our efforts are not solely for a single editor, we improve the quality of life of the entire ruby community, no matter which editor they use.

I'm the creator and one of the maintainers of solargraph-rails, a plugin for solargraph that inspects metadata and documentation in your Rails code. It improves Solargraph's awareness of things like ActiveRecord attributes and associations. Once Solargraph is able to supply this information to your editor, your editor is able to offer features like go-to-definition to you.

If accepted are you able to give a live q&a discussion at our virtual event on june 15 - 16?

Yes

Speaker Information

I'm Fritz Meissner, a developer at thoughtbot EMEA. I lived in Cape Town in South Africa all my life until 2021 when I thought I'd try a travel adventure in the middle of a pandemic, and moved my life to London.

I'm the author of solargraph-rails, a plugin for solargraph that gives solargraph some extra help to understand Rails' metaprogramming magic.

@cpjmcquillan
Copy link

I only had time to give this a brief read, but it looks good to me.

in order to empower a community that believes that good tooling is for other languages.

This phrasing took me a couple of tries to grasp, though. And I'm still not certain I understood it entirely.

But my tldr review is that this sounds really interesting and I hope it is accepted!

@eveadele
Copy link

This sounds really cool! I would love to go to this talk. I always thought that tooling in Ruby either (a) doesn't exist or (b) is really slow and unreliable and so not worth it. Would it be worth it to add a bullet point addressing tradeoffs of using solargraph? If there aren't really any downsides, I think a quick mention of "you might think it'll slow your editor down [or some other bad outcome], but it won't!" would be nice.

@mike-burns
Copy link

This is great and I'm excited about this talk.

Language nitpicking:

  • intellisense is spelled IntelliSense, a product from Microsoft. I think if you're trying to talk to people who know that word, it makes sense to capitalize it.
  • More Microsoft capitalization: TypeScript.
  • Up to you whether you want to say "thoughtbot" instead of "thoughtbot EMEA".

@iftheshoefritz
Copy link
Author

Thanks folks! Proposal submitted with your helpful feedback included :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment