Skip to content

Commit f57d2b6

Browse files
authored
Apply indexing configuration to ruby-lsp-doctor (#1827)
* Apply indexing configuration to ruby-lsp-doctor * Abort if reading config fails --------- Co-authored-by: Andy Waite <[email protected]>
1 parent 45b0f4c commit f57d2b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

exe/ruby-lsp-doctor

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
55
require "ruby_lsp/internal"
66

7+
if File.exist?(".index.yml")
8+
begin
9+
config = YAML.parse_file(".index.yml").to_ruby
10+
rescue => e
11+
abort("Error parsing config: #{e.message}")
12+
end
13+
RubyIndexer.configuration.apply_config(config)
14+
end
15+
716
index = RubyIndexer::Index.new
817

918
puts "Globbing for indexable files"

0 commit comments

Comments
 (0)