2

How do I change, in my .spacemacs, the style used to highlight the matching parenthesis?

2
  • just install rainbow-delimeters and be happy.
    – A_P
    Feb 15, 2019 at 17:15
  • I’m already using rainbow delimiters. I just need the highlight of the matching parenthesis the cursor is currently on. Thanks though :)
    – Dionysis
    Feb 15, 2019 at 18:04

2 Answers 2

2

You can see a list with all the colors set by emacs with M-xlist-faces-display RET.

There you can search for the faces corresponding to parenthesis matching: show-paren-match in this case. If you click on it to customize it, test it or even save it. If you choose to save, this setting will be saved to your custom-file (C-hvcustom-fileRET - for more info).

If you want to directly set the face in your .spacemacs you could use custom-set-faces

(custom-set-faces
 '(show-paren-match ((t (:foreground "white" :background "red")))))

or use your theme name with custom-theme-set-faces:

(custom-theme-set-faces
 'your-theme-name-here ;; e.g. 'spacemacs-dark
 '(show-paren-match ((t (:foreground "white" :background "red")))))

or by using the theming layer

(setq theming-modifications 
'((your-theme-name ;; e.g. spacemacs-dark
       (default :foreground "white" :background "red"))))

or by using set-face-attribute

(set-face-attribute 'show-paren-match nil :foreground "white" :background "red")
3
  • That should be the right answer but I tried it and it doesn't have any effect.. Something must be overriding it after my setting it in .spacemacs. Do you know of a way to troubleshoot?
    – Dionysis
    Feb 13, 2019 at 18:04
  • I have added some more info to the response.
    – caisah
    Feb 13, 2019 at 19:34
  • Thank you. This is great info! Unfortunately it's still not working. I have no idea what is going on. There must be something taking over so will have to try it after I remove other parts of my configuration. I will accept your answer anyway as this is all someone needs to know to make it work under normal circumstances.
    – Dionysis
    Feb 13, 2019 at 20:14
1

Would leave comment but don't have the reputation yet. For me it was Highlight-Parentheses minor mode. I use spacemacs so its likely what was bothering you too.

1
  • This is exactly what I was looking for. It highlights too many pairs of parens. Thanks for the answer!
    – xji
    Jun 16, 2020 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.