-
-
Notifications
You must be signed in to change notification settings - Fork 58
Allow CLI flags for lsp #99
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing a self review, it strikes me that it's not obvious how one would register a third-party plugin (that isn't part of the
syntax_tree
gem).I suppose another gem could expose a
lib/syntax_tree/foo
source, which might work in a Bundler setting (where the gem is pre-activated and itslib
is added to the load paths).When using system gems, I'm not sure this "delegated lib subdir" idea would work, as I vaguely recall some magic with
require
'ing a gem name and auto-activating it which might foil "deep require" of nonstandard-named lib subdirs... it's been too long since I've been without Bundler!Perhaps the CLI needs an
-r
option to ensure gems are activated .. or perhaps an executable config file that can do whatever and configuresyntax_tree
is a better fit? 🤔Anyhow: my comment applies to all uses of this option,
lsp
or no; not particularly relevant to this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to be explicit about this in the README (https://github.com/ruby-syntax-tree/syntax_tree#configuration). It should be fine to add a
syntax_tree
directory under a path that is already in the require path. There are a lot of gems that do this (for example any Rails plugin that adds generators).If folks need other gems activated that they for some reason can't require in their own plugins, I'm going to say they should use
RUBYOPT
instead. This isn't meant to be a whole replacement for the require system, just a small convenience option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't considered
RUBYOPT
that ought to be sufficient for anyone's needs.