Skip to content

Properly handle methods for definition, completion and hover #899

@vinistock

Description

@vinistock

Depends on #898 and #1333

Use the index to provide go to definition for methods.

Might depend on exploring using a control flow graph (CFG) to implement reaching definitions. While we do not provide typechecking, using reaching definitions might allow us to be more precise.

For example

a = "something"
# We know that `a` is a string because it's a literal, so we know 100% sure this has to be
# String#upcase. If we have an implementation of reaching definitions, we can make this work
a.upcase

Checklist

  • Attributes. The LSP protocol has special types for them, so we should create a separate index entry
  • Taking new invocations to initialize. For completion, it's actually the opposite, we need to use the signature for initialize, but complete to new
  • Method aliases through alias_method and alias

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpinnedThis issue or pull request is pinned and won't be marked as stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions