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

Add steps for indexing troubleshooting #2367

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,19 @@ ruby-lsp
Is there any extra information given from booting the server manually? Or does it only fail when booting through the
extension?

## Indexing ##
andyw8 marked this conversation as resolved.
Show resolved Hide resolved

When Ruby LSP starts, it attempts to index your code as well as your dependencies as described in [Configuring code indexing](README.md#configuring-code-indexing).

In rare cases, Ruby LSP will encounter an error which prevents parsing from completing, meaning Ruby LSP cannot start.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We rescue all indexing errors, so that the language server doesn't crash. The only consequence of an indexing failure is incomplete indexing data.

Suggested change
In rare cases, Ruby LSP will encounter an error which prevents parsing from completing, meaning Ruby LSP cannot start.
In rare cases, Ruby LSP will encounter an error which prevents indexing from completing, which will result in incomplete information in the editor.


Firstly, ensure that you are using the latest release of the `ruby-lsp` gem, as the problem may have been already fixed.

To diagnose the particular file(s) causing a problem, run `ruby-lsp --doctor`. Please log an issue so that we we can address it. If the code is not open source then you can try write a minimal reproduction.
andyw8 marked this conversation as resolved.
Show resolved Hide resolved

In the meantime, you can [configure Ruby LSP to ignore a particular gem or file for indexing]([README.md#configuring-code-indexing]).


## After troubleshooting

If after troubleshooting the Ruby LSP is still not initializing properly, please report an issue
Expand Down
Loading