-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor, added settings, several folding improvements, enhanced condition checking, enhanced jump action, kotlin k2 fix, formatting highlights #24
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
Conversation
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
…eprocessorVersion` class usages in later commits (this commit was cherry-picked after the fact)
usages in later commits (this commit was cherry-picked after the fact)
…ass for more generic use outside `PreprocessorNewLineHandler` fixes: - added loader condition parsing e.g. `//#if FABRIC` - added parsing for multiple chained expressions e.g. `//#if FABRIC && MC>=1` - fixed the broken `.prevSibling` iterating that did not always properly navigate to previous directive Psi's usages in later commits (this commit was cherry-picked after the fact)
…ending on their conditions (or always)
…whether they met the preprocessor conditions at the caret position of the current file
- highlight if directives that are not further indented than their outer containing block - highlight non directives & `//$$` that are not inline with their initial if directive
…ile types that don't have backing files
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.
Description
Sorry about it being so large, this pr should be MUCH EASIER to review commit by commit
Features:
//#if this && that
//#if FABRIC && !FORGE
//$$
insertion on new linesFixes:
PreprocessorNewLineHandler
noticablyprevSibling
iterating not correctly finding previous directivesmainVersion
for all files,mainVersion
is still a fallback if this failsRelated Issue(s)
Fixes #22
Fixes #20 but not the side note
Fixes #18
Fixes #15 to an extent
How to test
automatic default folding based on file version

in 1.12.2 version file
settings screen with default settings

differentiate jump to files based on conditions applied at caret

same but with non matches hidden

format highlighting



other changes arent really showable via screenshot, will require actual testing with k2 kotlin mode && various preprocessor conditions that didnt work before such as
//#if MC>11600 && !FABRIC
Release Notes