I'm using the latest plugin from VSCode but 5000 seems like a low limit, is there a way to change this limit in a configuration?

Raising the limit or allowing it to be configurable are possibilities. The primary reason for the limit is to serve as a sanity check, e.g., if someone opens their entire home directory as a workspace. When that error occurs, the server will still index open files, but will not generate project-wide API maps.
You might also be able to resolve the issue by adding a .solargraph.yml file to your project. The current default behavior is to index all .rb files except for test and spec directories. If your project has a vendor directory, you might want to exclude that as well. Example configuration:
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
reporters: []
domains: []
required: []
plugins: []
Note that excluded files will still be mapped while you're actively editing them, but their symbols won't be included in other files.
The next version of the gem will exclude the vendor directory by default. The preferred method for mapping vendor code is through its YARD documentation.
Thanks for the reply!
I've already excluded tests/vendor/etc to bring my project from ~40k to 22k files, there isn't anything more I can do on this front. I also regularly work on projects that are roughly this size so this doesn't seem unusually large to me.
I believe that indexing and code completion is more important in larger projects as the amount of code is harder to keep all in your head so anything that can be done to support a higher limit would be appreciated.
Fair point. I certainly don't want to force large projects to work with reduced functionality.
I'll add some sort of mechanism to version 0.21.0, which I hope to release next week. Most likely it'll be an option in .solargraph.yml that allows you to set or remove the workspace size limit. That seems like a decent compromise between users who open a directory that shouldn't get mapped and users who know how big their project is.
Thanks again for the response, I am looking forward to that release.
The master branch includes a max_files setting in .solargraph.yml. The default is 5000. Setting it to 0 removes hard limits on the workspace size.
Version 0.21.0 should be published by May 7.
Gem version 0.21.0 is published. Setting max_files in.solargraph.yml should resolve this issue.
@jtaekema you should also exclude the .bundle folder, if you don't find it a problem. Usually what slows down solargraph is indexing all the dependencies of the project.
Is this something that can be configured in the vs code extension or does this require a .solargraph.yml file? If not, is this something that could be added to the extension? Thanks.
Ping on this. How do I set max_files to a value of my choosing via VS Code settings?
You need to do it in your project's .solargraph.yml file. Documentation: https://solargraph.org/guides/configuration
Most helpful comment
Gem version 0.21.0 is published. Setting
max_filesin.solargraph.yml should resolve this issue.