Repository navigation
Fix setopt-local and turning alignment on in open buffers - #173
Merged
Merged
Conversation
Since #164 indent-region-function was only set when clojure-ts-align-forms-automatically was on as the mode started, so turning it on later in an open buffer, with setopt or setq-local, left indent-region unaligned. clojure-ts-indent-region checks the option when it runs, which is also what makes a directory-local value work, so it can be set unconditionally again.
#164 made the setters take the buffer-local argument setopt-local passes, but then they only set the variable: a buffer kept the indentation rules of its old style, and its old faces until something refontified it. A directory-local value worked anyway, because clojure-ts--apply-local-variables runs after it's set.
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.
Follow-up to #164.
setopt-localofclojure-ts-indent-styleor of a font-lock option set the variable without reconfiguring the buffer, and turningclojure-ts-align-forms-automaticallyon in an open buffer no longer aligned, sinceindent-region-functionwas only set when the option was on as the mode started.