Skip to content

Conversation

@supersaiyansubtlety
Copy link
Member

@supersaiyansubtlety supersaiyansubtlety commented Oct 20, 2025

This PR eliminates automatic installation of components and listeners and generally tries to reduce the amount of "magical" side-effects-based behavior.

This makes things more customizable and easier to follow.

Can be tested by publishing locally and checking out QuiltMC/enigma#317


Remaining magic:

  • JavaLexer: it's generated by jflex; that's just fundamentally how it works
  • JavaSyntaxKit is still installed to make editors use SyntaxViews and SyntaxDocuments;
    AFAICT there's no way to manually attach a different ViewFactory to an editor without completely replacing its TextUI which would also replace all the functionality of the UI installed by flatlaf.

Also:

  • allows offsetting LineNumbersRuler's numbers (for use in tooltip snippets)
  • removes a few instances of setting colors and fonts in favor of setting them in enigma
  • removes SyntaxpainConfiguration but adds JavaSyntaxKit::setSyntaxColors for SyntaxStyle; keeping this is necessary because JavaSyntaxKit is still magical
  • removes a couple classes that were only necessary for magic or whose functionality made sense to move to other classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant