Skip to content

vscode: Using "Selection->Expand Selection" selects wrong scope #49

@fkoehler

Description

@fkoehler

I am not sure if this issue belongs to this repo or should live somewhere else. I am using metals with vscode and find the expand selection for scala code to be quite greedy. Here is an example snippet:

object Test {
  val foo = "bar"
  def call(s: String, s: String): Unit = ???
}

object Scope {
  Test.call(Test.foo, Test.foo)
}

Putting the cursor on the Test object name inside the Test.call call and using Selection->Expand Selection it selects first the Test object which is correct, but then the entire parentheses block and not just the member foo.

Result:
image

Expected:
image

If it is in this repo where is a starting point to look? Maybe I can figure the error out

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