emacs-sideline / sideline-flycheck

Show flycheck errors with sideline
GNU General Public License v3.0
18 stars 5 forks source link

How to start automatically? #1

Closed austinjp closed 1 year ago

austinjp commented 1 year ago

Hi there. I'm loving sideline-flycheck :)

This is more of a question than an issue. How can I start it automatically? I can start it manually by typing M-x sideline-flycheck-mode per buffer, but can I have it running by default for every buffer?

Relevant part of my .emacs:

;; Use sideline and sideline-flycheck to display messages from flycheck.
(use-package sideline
  :init
  (global-sideline-mode)
  (setq
   sideline-backends-right '(sideline-flycheck)
   ;; sideline-backends-skip-current-line t  ; don't display on current line
   sideline-order-right 'down                ; or 'up
   sideline-format-left "%s   "              ; format for left aligment
   sideline-format-right "   %s"             ; format for right aligment
   sideline-priority 100                     ; overlays' priority
   sideline-display-backend-name t           ; display the backend name
   )
  )
(use-package sideline-flycheck
  :init (sideline-flycheck-mode)
  :hook
  (flycheck-mode-hook . sideline-mode)
  (flycheck-mode-hook . sideline-flycheck-setup)
  )
jcs090218 commented 1 year ago

There is global-sideline-mode which you can enable globally. Does this help?

austinjp commented 1 year ago

Hi, thanks for the reply. I've already enabled global-sideline-mode but sideline-flycheck-mode remains inactive until I start it manually. Conformation in an ielm buffer on a fresh restart of Emacs:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> global-sideline-mode
t
ELISP> sideline-flycheck-mode
nil
ELISP> (sideline-flycheck-mode)
t
ELISP> sideline-flycheck-mode
t
ELISP>

Is there a way you personally start sideline-flycheck-mode automatically?

jcs090218 commented 1 year ago

There is no function called sideline-flycheck-mode. You mean sideline-flycheck-setup? 😕

Since you have these lines :hook (flycheck-mode-hook . sideline-mode) (flycheck-mode-hook . sideline-flycheck-setup), you would just have to call flycheck-mode to get the sideline active.

austinjp commented 1 year ago

Hmm, okay I'm not sure how that got in there :) I've removed it from my .emacs but it's still not working. I'll keep trying and report a working config if I get one going. I got sideline-flymake working instead for now. Thanks again, I'll close this.