Repository navigation
Fix the options .dir-locals.el couldn't set - #172
Merged
Merged
Conversation
bbatsov
force-pushed
the
fix-local-options
branch
2 times, most recently
from
November 1, 2026 09:30
a5af0a9 to
1772442
Compare
The markdown-inline entry of clojure-ts--thing-settings sat in a `when' form that the backquote didn't evaluate, so it defined the things of a language called `when' and never took effect. Making it take effect isn't an improvement: on Emacs 30, where forward-sexp goes through these things, C-M-f and C-M-k from a plain word in a docstring would jump to the end of the next code span, and Emacs 31 moves over atoms without them. Remove it.
clojure-ts-outline-variant and clojure-ts-completion-enabled are safe as directory-local variables, but they were only read while the mode set itself up, before the directory-local ones are set. Redo their part of the setup when they're set locally, like for the indentation style. The imenu variant of the outline now gets set up here too, rather than by treesit-major-mode-setup, so that switching to it works. Only the two valid values of clojure-ts-outline-variant are safe now, so a typo in .dir-locals.el doesn't silently select the imenu outline.
clojure-ts-ensure-grammars, clojure-ts-auto-remap and the options that turn the embedded parsers on and off are read when the package loads or when the mode sets up its parsers, before any directory-local variables are set. Marked safe, they were silently ignored in .dir-locals.el.
bbatsov
force-pushed
the
fix-local-options
branch
from
November 1, 2026 10:40
1772442 to
2c5f247
Compare
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.
clojure-ts-outline-variantandclojure-ts-completion-enablednow work from.dir-locals.el. The options that only take effect when the package loads or the mode creates its parsers are no longer marked safe, since a directory-local value never reaches them; a project that sets one gets the usual prompt instead of being silently ignored. Also drops a thing-settings entry that never took effect, as enabling it would make sexp commands on Emacs 30 jump across docstring words.