Skip to content

Support textDocument/documentHighlight message for definitions of variable #5442

@gavinmorrow

Description

@gavinmorrow

When triggering the message over the definition of a variable in a scope, highlight all instances of that variable.

For example:

fn foo() {
  // Cursor here (for example)
  //  ↓
  let bar = 5
  //  ^^^
  let baz = bar * 2
  //        ^^^
  let qux = 3 + bar
  //            ^^^
  baz + bar + qux
  //    ^^^
}

See #5427.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions