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

Apply indexing configuration to ruby-lsp-doctor #1827

Merged
merged 2 commits into from
Mar 27, 2024
Merged
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
3 changes: 3 additions & 0 deletions exe/ruby-lsp-doctor
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
require "ruby_lsp/internal"

if File.exist?(".index.yml")
RubyIndexer.configuration.apply_config(YAML.parse_file(".index.yml").to_ruby)
Copy link
Member

Choose a reason for hiding this comment

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

This may file to parse. Let's rescue here and warn if the YAML file is invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made it abort instead of warn, since a warn might be easy to miss among the other output.

end
index = RubyIndexer::Index.new

puts "Globbing for indexable files"
Expand Down
Loading