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

Don't suggest fully qualified constants when unnecessary #1983

Closed
1 task done
dgollahon opened this issue Apr 26, 2024 · 0 comments · Fixed by #2009
Closed
1 task done

Don't suggest fully qualified constants when unnecessary #1983

dgollahon opened this issue Apr 26, 2024 · 0 comments · Fixed by #2009
Labels
enhancement New feature or request

Comments

@dgollahon
Copy link

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

I use the auto-completion feature. Unfortunately, it proposes constants like MyApp::Foo::Bar rather than Foo::Bar when I am inside the MyApp module. This is pointless/not preferred in our coding style.

You can get these suggestions in some cases but I predominantly get the fully qualified constant name which greatly reduces the usability of this feature for me.

Description

Prefer the shortened version of the constant when inside the class/module hierarchy.

Implementation

I am guessing it would be possible to track current scope based on how the breadcrumbs in my editor show me which modules/methods i'm inside--it would need to take this context into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants