this post was submitted on 31 Aug 2024
4 points (100.0% liked)

Ruby

534 readers
1 users here now

A community for discussion and news about Ruby programming.

Learning Ruby?

Tools

Documentation

Books

Screencasts

News and updates

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] tyler 1 points 2 months ago (2 children)
[–] Sickday 3 points 2 months ago (1 children)

RubyMine is an Interactive Development Environment, not a Language Server Protocol. RubyMine doesn't need to use an LSP since it has all the features an LSP offers (and more) built into to the environment.

[–] tyler 1 points 2 months ago

Yup. My point by posting was to contribute to the conversation that I don’t use an LSP

[–] [email protected] 2 points 2 months ago (1 children)

can RubyMine completion shows the method for word variable here?

# frozen_string_literal: true

array_of_strings = %w[foo fooo bar fioo]
oo = array_of_strings.select { |word| word.end_with?('oo') }
puts oo

for example the end_with? method cuz with both solargraph and ruby-lsp they don't show any suggestions for the word variable at all.

[–] Sickday 3 points 2 months ago (1 children)

Yes, RubyMine will offer completion for this block.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

now i'm confused about why solargraph, which is said to be mature, can't do that. and also i just realized it when i used map instead of select; the methods appeared.

wanna try RubyMine but i already comfortable in neovim. since RubyMine is an IDE i think my machine can't handle that lol.

[–] Sickday 2 points 2 months ago* (last edited 2 months ago)

now i'm confused about why solargraph, which is said to be mature, can't do that

It's important to note that ruby-lsp is made by Shopify, and is currently used in-house by the company. The resources they can invest into ruby-lsp both in terms of development man-power and project management is naturally going to be higher than the community developed solargraph.

and also i just realized it when i used map instead of select; the methods appeared.

That's strange, but Enumerable#map and Enumerable#select have different uses. One is used to execute a block across a collection of elements, while the other constructs a new collection based on the block passed to a collection and the results of evaluating that block against each element.

wanna try RubyMine but i already comfortable in neovim. since RubyMine is an IDE i think my machine can't handle that lol.

I use RubyMine on my desktop and it's a very solid development experience. I'll say that if your machine can't quite handle RubyMine, VS Code(ium) is a nice alternative with the solargraph or ruby-lsp plugins. I don't know if they'll have the same completion issue as neovim though.