From 08f4e88f6097aca199d26fe68fd31bc3170b1ee3 Mon Sep 17 00:00:00 2001 From: Konstantin Munteanu Date: Tue, 11 Apr 2023 13:48:48 +0200 Subject: [PATCH] Setup from require_paths --- lib/solargraph/workspace.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/solargraph/workspace.rb b/lib/solargraph/workspace.rb index 7efadf6f3..c0dc6ce6c 100644 --- a/lib/solargraph/workspace.rb +++ b/lib/solargraph/workspace.rb @@ -32,6 +32,7 @@ def initialize directory = '', config = nil load_sources @gemnames = [] @require_paths = generate_require_paths + setup_load_paths require_plugins end @@ -208,5 +209,10 @@ def require_plugins end end end + + def setup_load_paths + # Make files available to require calls in for example rubocop + $LOAD_PATH.unshift *@require_paths + end end end