2

Flycheck has a symbol that tells in which line an error or warning have been encountered. I have seen spacemacs has its flycheck symbol changed. Default symbol is a double arrow; while spacemacs's symbol is a dot. I can't find a function to change it. How did spacemacs do that?

Spacemacs flycheck symbol looks like this (red dot)

1

After reading flycheck source code..

1) You must define a fringe bitmap (the "symbol") with 'define-fringe-bitmap' function.

2) Use 'flycheck-define-error-level' function to load the new bitman

3) Enable Flycheck mode

Example:

(define-fringe-bitmap 'flycheck-fringe-bitmap-ball
    (vector #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00111000
            #b01111100
            #b11111110
            #b11111110
            #b01111100
            #b00111000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000
            #b00000000)))

(flycheck-define-error-level 'error
  :severity 100
  :compilation-level 2
  :overlay-category 'flycheck-error-overlay
  :fringe-bitmap 'flycheck-fringe-bitmap-ball
  :fringe-face 'flycheck-fringe-error
  :error-list-face 'flycheck-error-list-error)
  • It worked, thanks. For those interested, for warnings and info just replace all "error" words with "warning" and "info" of flycheck-define-error-level. – Michael Oct 23 '17 at 22:26
  • Also, I used 2, 1 and 0 for severity of errors, warnings and info respectively. – Michael Oct 23 '17 at 22:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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