Support for aligning with declaration words (let,var,const,etc.)#94
Open
sylido wants to merge 22 commits intowbond:masterfrom
Open
Support for aligning with declaration words (let,var,const,etc.)#94sylido wants to merge 22 commits intowbond:masterfrom
sylido wants to merge 22 commits intowbond:masterfrom
Conversation
… separator, and value end up.
Fixed the 'unassigned' variables bug
…cted; added palette command
Update with a bunch of PRs
More useful handling of multiple selection
…faults - they are configurable through the settings. Now aligning all rows based on the row that has the declaration statement. If there are more than one spaces/tabs after the declaration they get trimmed to only one. To be able to format correctly, you currently have to run the alignment twice - to be fixed in a future version. Reformatted some code and aligned all the variables with this plugin.
…ly format the text. Worked on formatting multi-character operators better.
Added a setting to turn on/off whole file alignment as it's currently buggy.
…ers in a string before the real alignment character i.e. "xml:ns" : "something" would be now aligned properly.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This seems to solve the main problem I was having with this package for a while, being able to select all my vars and use the alignment to auto-align.
The declaration words are customizable through the new
declarationsfield in the settings file, by default those are the"var", "let", "const"ones.Added
:to the list of defailt alignment characters as it is very useful for json formatting. The:will now also get an empty space in front and behind it as well.Can format a whole file correctly as well, but it's buggy with longer files. Just have to not select anything in the file to trigger that with the same shortcut.
Includes fixes from some other PRs in the hope of getting this reviewed and merged in.
Have tested it for a year+ without having any issues with my usual workflow.