Shopify / Shopify/ruby-lsp

Autocomplete when writing new classes/modules is not very helpful

Open
#2,335 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug pinned
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

Description
Reproduction steps

When typing class/module and continuing on, ruby-lsp offers existing classes/modules as autocomplete. This is a nice idea, however I find it highly annoying in basically all cases:

https://github.com/user-attachments/assets/ce69a9db-a5cc-467f-a574-259d0a4b848d

Basically, I can't use enter in most of the cases here and have to either remember to press escape beforehand or undo the autocomplete after it happened.

I think, an ok solution may be to insert what was currently typed as the first suggestion. Or maybe to not offer third-party classes/modules here (but even then you will be at the innermost layer at one point which then will contain an identifier not yet indexed), most of the time you're not reopening third-party classes/modules. Not sure what the best thing to do is, I just know I'm unhappy with how it currently works.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified in the issue. Reproduce the autocomplete behavior while typing a new class or module in ruby-lsp, then define and verify completion behavior that lets Enter preserve the intended text without unwanted existing-class or module insertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.