Hello All, I'm working on refactoring terraform mode and I've stumbled across a fontification issue I cannot figure out how to solve. [image: image.png] A resource can be broken down into the three parts: The keyword "resource", the resource type (green in the image), and the resource name (pink in the image). The resource name and type are string literals so I used the override flag for the regex when setting font-lock-defaults: (defvar terraform-font-lock-keywords ;; other code (,terraform--block-builtins-with-type-and-name--type-highlight-regexp 2 'terraform--resource-type t) (,terraform--block-builtins-with-type-and-name--name-highlight-regexp 3 'terraform--resource-name t))) (define-derived-mode terraform-mode prog-mode "Terraform" ;; other code (setq font-lock-defaults '((terraform-font-lock-keywords)))) However, this is causing the issue above where the search based highlighting is overriding the comment highlighting. Is there a way to only have search based fontification only override strings but keep comments unaltered? Cheers, Reza