Skip to content

Allow to set a target syntax version (or use non-current ruby syntax) #982

@ShadiestGoat

Description

@ShadiestGoat

I'd like to be able to set the ruby target version via the solargraph config file. My personal use case is that I have an old ruby 2.7 project that I constantly work with, but cannot upgrade to ruby 3. I'd like to continue to be able to use the latest solargraph with this project, but as of 0.53, its not possible.

My proposal is the following:

  • Add ruby_version to the .solargraph.yml
  • Not concern solargraph with version detection - though this could be done in a later version
  • Not concern solargraph with module resolution - the gems can be installed on the version that solargraph runs under

The only thing that ruby_version would do is just set the parser to parse that version's syntax

Opinions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions