Skip to content

when enabling cider-font-lock-dynamically, regexp highlights are not displayed #3787

Description

@scramjet

Expected behavior

Using highlight-regexp to highlight a regexp, or highlighting with the highlight-symbol package, I expect the requested symbol to be highlighted with background colour.

Actual behaviour

Sometimes the highlights are not displayed.

With highlight-symbol, the failure is accompanied by this error in *Messages*:

Error during redisplay: (jit-lock-function 6057) signaled (invalid-regexp "Regular expression too big")

Steps to reproduce the problem

  1. (setq cider-font-lock-dynamically t)
  2. Load a Clojure or ClojureScript file.
  3. Use highlight-regexp (M-s h r) to try to highlight a regexp
  4. Nno highlight is displayed

Unfortunately I haven't worked out how to reliably trigger, it just happens on some files. (setq cider-font-lock-dynamically nil) and reloading fixes, and it doesn't happen if the file is not require'd by anything. It seems to happen more often with CLJS.

Environment & Version information

clojure-mode (version 5.19.0)

CIDER version information

;; CIDER 1.16.1 (Kherson), nREPL 1.0.0
;; Clojure 1.11.1, Java 14.0.2

Lein / Clojure CLI version

Leiningen 2.9.5

Emacs version

GNU Emacs 29.1 (build 1, aarch64-apple-darwin24.1.0, Carbon Version 170 AppKit 2575.2) of 2024-11-28

Operating system

macOS 15.3.2

JDK distribution

OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.2+12)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions