Skip to content

Go-to definition for singleton methods defined via class << self #3050

Closed
@jesseduffield

Description

@jesseduffield

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

I would like to be able to go-to definition for singleton methods defined via the class << self syntax.

Description

Specifically, If I have:

module Foo
  class << self
    def bar
      # do something
    end
  end
end

...
# in another file
Foo.bar

I want to be able to click on the bar in Foo.bar and go to the definition in the Foo module.

Currently you can go to definition for singleton methods defined with the self.foo syntax but not with the class << self syntax.

Implementation

No response

Other

I noticed that there were a couple of PRs relating to this, but they were both closed:
#1113
#1250

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions