Skip to content

Commit

Permalink
Apply indexing configuration to ruby-lsp-doctor (#1827)
Browse files Browse the repository at this point in the history
* Apply indexing configuration to ruby-lsp-doctor

* Abort if reading config fails

---------

Co-authored-by: Andy Waite <andyw8@users.noreply.github.com>
  • Loading branch information
andyw8 and andyw8 committed Mar 27, 2024
1 parent 45b0f4c commit f57d2b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions exe/ruby-lsp-doctor
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
require "ruby_lsp/internal"

if File.exist?(".index.yml")
begin
config = YAML.parse_file(".index.yml").to_ruby
rescue => e
abort("Error parsing config: #{e.message}")
end
RubyIndexer.configuration.apply_config(config)
end

index = RubyIndexer::Index.new

puts "Globbing for indexable files"
Expand Down

0 comments on commit f57d2b6

Please sign in to comment.