Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go directly to a valid constructor or apply method #338

Open
susliko opened this issue Apr 5, 2023 · 1 comment
Open

Go directly to a valid constructor or apply method #338

susliko opened this issue Apr 5, 2023 · 1 comment
Assignees

Comments

@susliko
Copy link

susliko commented Apr 5, 2023

Describe the bug

Using 'Go to definition' functionality in the following places

import java.math.{BigDecimal => JBigDecimal}

new JBigDec<<>>imal("0")
BigDeci<<>>mal("0")

leads to the definition of types java.math.BigDecimal scala.BigDecimal correspondingly

Expected behavior

Either jump to the specific constructor (or apply method) right away or include it in the jump list suggestions on par with the type definition

Operating system

macOS

Editor/Extension

Nvim (nvim-metals)

Version of Metals

v0.11.11

Extra context or search terms

definition constructor apply

@tgodzik tgodzik self-assigned this Apr 5, 2023
@tgodzik
Copy link
Contributor

tgodzik commented Apr 5, 2023

Thanks for reporting! I will this to the feature requests repo as the current behaviour is expected.

@tgodzik tgodzik transferred this issue from scalameta/metals Apr 5, 2023
@tgodzik tgodzik changed the title Go to definition for constructors Go directly to a valid constructor or apply method Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants