nashamri / spacemacs-theme

Light and dark theme for spacemacs that supports GUI and terminal
GNU General Public License v3.0
600 stars 113 forks source link

Comment background cannot be turned off #122

Open dschrempf opened 6 years ago

dschrempf commented 6 years ago

Setting

  (setq spacemacs-theme-comment-bg nil)

Either in dotspacemacs/user-init or dotspacemacs/user-config has no effect.

nashamri commented 6 years ago

Hmm, I put (setq spacemacs-theme-comment-bg nil) in my dotspacemacs/user-init and it works fine on my end. I'm using emacs 26.1 (spacemacs on develop branch).

TyOverby commented 6 years ago

Same thing is happening to me. I put it in my user-init and nothing happens. I use m-x customize to set the value manually and nothing happens.

TyOverby commented 6 years ago

I've tested this under master and develop branches.

TyOverby commented 6 years ago

I can't repro this with a clean spacemacs config, so something must be going on in my config...

nashamri commented 6 years ago

I've just tested it again with both variants of the theme. It works fine. s

dschrempf commented 5 years ago

Thanks for looking into this. Apparently, it is not enough to set spacemacs-theme-comment-bg in dotspacemacs/user-init. I added it to dotspacemacs/init, and then it works. I refrained from adding it to the initialization function so far, because as far as I know, it is considered bad practive. Let me know, if there is a better way! Maybe this should also be added to the help?

ianyepan commented 5 years ago

Try reloading your init file using M-x load-file. This is what works for me so far

deescuderoo commented 5 years ago

I'm trying to use this theme with heaven-and-hell. This is my snippet for that:

(use-package heaven-and-hell
  :ensure t
  :init
  (setq spacemacs-theme-comment-bg nil)
  (setq spacemacs-theme-keyword-italic t)
  (setq heaven-and-hell-theme-type 'dark) ;; Omit to use light by default
  (setq heaven-and-hell-themes
        '((light . spacemacs-light)
          (dark . spacemacs-dark))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
  :hook (after-init . heaven-and-hell-init-hook)
  :bind (("C-c <f6>" . heaven-and-hell-load-default-theme)
         ("<f6>" . heaven-and-hell-toggle-theme)))

However, the background for the comments only works with the light theme, but not with the dark theme. Any hint about how to do this correctly? Thanks a lot, and I apologize by the way, I'm a newbie with customizing Emacs and it may be the case that my snippet does not make any sense at all.

EDIT

I just edited spacemacs-common.el:

(defcustom spacemacs-theme-comment-bg nil
  "Use a background for comment lines."
  :type 'boolean
  :group 'spacemacs-theme)

I don't know though if this is advisable.