Shopify / Shopify/ruby-lsp

Improve indexing behaviour (for editors other than VS Code, e.g. Zed)

Open
#3,384 13 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

👋 As previously discussed by @vinistock in this Zed issue:

We currently don't update the index on textDocument/didChange, which means new declarations are only available once you save the file (after we receive the didChangeWatchedFiles notification). We do need to change that and start indexing on didChange too, so that unsaved declarations show up.

It's also been noted that for Zed at least, saving the file doesn't re-index it, you need to reload the editor.

I may open a PR for this, just wanted to log it first for easier reference and discussion.

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

Start by tracing handling of textDocument/didChange and didChangeWatchedFiles notifications. Check how indexing behaves for unsaved declarations and after saving in editors such as Zed; done means changes are indexed without requiring a reload and declarations become available before saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.