Skip to content
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

Add option to disable indentation in environments #3411

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

slideclimb
Copy link
Collaborator

@slideclimb slideclimb commented Jan 28, 2024

Fix #3218

Summary of additions and changes

  • Add option to disable indentation in all environments.
  • This option can still be overridden for the document environment.

How to test this pull request

Play with indentation settings and format the following text (also see tests):

\begin{document}
    Don't indent this if turned off.
    \begin{some-env}
    Indent this.
    \end{some-env}
\end{document}
  • Updated the documentation, or no update necessary
  • Added tests, or no tests necessary

Copy link
Collaborator

@PHPirates PHPirates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! seems to work fine. Maybe add to the documentation also our current opinion about removing indentation.

I think moving to the Kotlin UI DSL has to be done by SmartIndentOptionsEditor so out of scope for TeXiFy?

@slideclimb
Copy link
Collaborator Author

I think moving to the Kotlin UI DSL has to be done by SmartIndentOptionsEditor so out of scope for TeXiFy?

Yes indeed. I actually tried doing it just for this component because the binding of the checkboxes is more intuitive in the UI DSL, but couldn't get it to work. At least not without ditching SmartIndentOptionsEditor, which is there for a reason, so I didn't try any further.

@PHPirates PHPirates added this to the Next milestone Feb 6, 2024
@PHPirates PHPirates merged commit 2eb6d85 into master Feb 6, 2024
6 checks passed
@PHPirates PHPirates deleted the 3218-environment-indents branch February 6, 2024 20:50
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.

Add option to disable automatic indent after a \begin command
2 participants