Skip to content

Commit

Permalink
Setup from require_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mkon committed Dec 12, 2023
1 parent d7a14bf commit 08f4e88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/solargraph/workspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def initialize directory = '', config = nil
load_sources
@gemnames = []
@require_paths = generate_require_paths
setup_load_paths
require_plugins
end

Expand Down Expand Up @@ -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

0 comments on commit 08f4e88

Please sign in to comment.