feat(harper-ls): Replace all in document with... #1796
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.
Find all similar lints and allow applying them all across the document in one code action. This should fix #998.
Issues
Fixes #998
Description
This adds additional quickfix actions which perform a particular lint suggestion document-wide. The intent being to resolve #998 in a reasonable fashion.
Demo
How Has This Been Tested?
I added the locally built
harper-ls
to myhelix
configuration and tested across a variety of markdown documents doing global replacements of the same and differing lengths, including situations where the action was similar but the lint different (eg. replacing a double-space in the middle of a sentence vs. after a full-stop). All seemed good.Also,
cargo test --all
didn't complain.Right now I'm not particularly pleased with how this is implemented, so I'm interested in the views of @elijah-potter in particular. I feel there must be a neater way to do this.
Checklist