vscode-scala-syntax
vscode-scala-syntax copied to clipboard
vscode: Using "Selection->Expand Selection" selects wrong scope
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:

Expected:

If it is in this repo where is a starting point to look? Maybe I can figure the error out
This is probably an issue with the language sever. Check the issue could come from
- https://github.com/scalameta/metals
- https://github.com/lampepfl/dotty/tree/master/vscode-dotty
Otherwise could be related with https://github.com/scala/vscode-scala-syntax/blob/master/language-configuration.json
This is quite annoying,do we have any updates now?