• 3 Posts
  • 43 Comments
Joined 2 months ago
cake
Cake day: July 13th, 2024

help-circle




  • 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.


  • occultist8128OPtoRuby@programming.dev[Question] What LSP Are You Using?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    11 days ago

    i also use solargraph and ruby-lsp but i’m facing an issue with this code i wrote:

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

    when i want to use end_with? method, both LSP don’t show any method for the word variable. do you know why is this happen? i also use neovim with coc.nvim for the LSP plugin. thanks for the reply btw :)