-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[feature] Allow automatically selecting FixIt action by pattern #4083
base: master
Are you sure you want to change the base?
Conversation
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.
Hmm
Thanks
I feel like this is better implemented in the server than the client. Ie the second argument to fix it can be used to filter the results server side.
I’m also unsure if regex is ideal. Any reason not to use an exact match?
Reviewable status: 0 of 2 LGTMs obtained
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4083 +/- ##
==========================================
+ Coverage 86.46% 86.49% +0.02%
==========================================
Files 33 33
Lines 4337 4346 +9
==========================================
+ Hits 3750 3759 +9
Misses 587 587 |
Makes sense. I could try submitting a patch on the server side if you would give me some pointers as where the changes would need to be.
Matching exactly "the entire" Matching exactly "a part of" the Also, I don't know if there are other fields besides |
6bef468
to
4da74f4
Compare
we'd probably do this in |
PR Prelude
Thank you for working on YCM! :)
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your PR:
rationale for why I haven't.
actually perform all of these steps.
Why this change is necessary and useful
Currently, it is difficult to automate application of some fixits, because it requires manual input to select a fixit.
For instance, suppose I want to frequently "organize imports" or "replace var by the type name" (in Java). I know the action is available, but I still need to wait for the list to show up and then select the option...
This PR adds support for selecting a FixIt based on a regex pattern provided when running the command:
Eg:
If this change makes sense, let me know, and I can try to also update the docs for it.
This change is