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

Make haml/rbs dependencies optional #1406

Merged
merged 3 commits into from
Nov 21, 2023
Merged
Changes from all commits
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
11 changes: 8 additions & 3 deletions src/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
require "json"
require "socket"

require "prettier_print"
require "syntax_tree"
require "syntax_tree/haml"
require "syntax_tree/rbs"

# Optional dependencies
%W[syntax_tree/rbs syntax_tree/haml prettier_print].each do |dep|
begin
require dep
rescue LoadError
end
end

# First, require all of the plugins that the user specified.
ARGV.shift[/^--plugins=(.*)$/, 1]
Expand Down