flycheck config
This commit is contained in:
@@ -9,38 +9,54 @@
|
||||
;; Requirements:
|
||||
;; - flycheck https://melpa.org/#/flycheck https://github.com/flycheck/flycheck
|
||||
|
||||
;; flycheck is used, because flymake supports less languages than flycheck
|
||||
;; `flycheck' is used, because flymake supports less languages than
|
||||
;; flycheck
|
||||
|
||||
;; there are in place temporary files for Python, LaTeX and Emacs Lisp, see https://github.com/flycheck/flycheck/issues/92
|
||||
;; if working with some kind of cloud sync systems, one may filter "flycheck_*" files
|
||||
|
||||
;; no activated yet:
|
||||
;; https://melpa.org/#/flycheck-pos-tip require pos-tip
|
||||
;; there are in place temporary files for Python, LaTeX and Emacs
|
||||
;; Lisp, see https://github.com/flycheck/flycheck/issues/92 if working
|
||||
;; with some kind of cloud sync systems, one may filter "flycheck_*"
|
||||
;; files
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; do not load directly with e.g. (global-flycheck-mode) or via
|
||||
;; after-init-hook while loading the init because flycheck will freeze
|
||||
;; for a short while. Therefore better defer loading.
|
||||
;;(require 'flycheck (concat config-dir "lisp/flycheck/flycheck.el"))
|
||||
;; (use-package flycheck
|
||||
;; :defer 2
|
||||
;; :init
|
||||
;; (setq flycheck-mode-line-prefix "F") ;; \u24BB \u01D4D5 \u2708 f ;; other flycheck settings see syntax-checking-settings.el
|
||||
;; (setq flycheck-mode-line '(:eval (concat (flycheck-mode-line-status-text) " ")))
|
||||
;; :config
|
||||
;; (setq-default flycheck-disabled-checkers '(python-flake8)) ;; disable the python-flake8 checker. This will make the next checker which is python-pylint to be used.
|
||||
;; (setq flycheck-check-syntax-automatically '(save mode-enabled)) ;; flycheck only while saving, default is (save idle-change new-line mode-enabled)
|
||||
;; ;; flycheck-mode-line-prefix see general-settings-post.el
|
||||
;; (setq flycheck-emacs-lisp-load-path 'inherit)
|
||||
;; ;;(add-hook 'after-init-hook #'global-flycheck-mode) ;; deactivated bc of defer
|
||||
;; (global-flycheck-mode))
|
||||
(use-package flycheck
|
||||
;; do not load directly with e.g. (global-flycheck-mode) or via
|
||||
;; after-init-hook while loading the init because flycheck will freeze
|
||||
;; for a short while. Therefore better defer loading.
|
||||
:defer t
|
||||
:init
|
||||
(require 'flycheck-autoloads)
|
||||
(setq flycheck-mode-line-prefix "F") ;; \u24BB \u01D4D5 \u2708 f
|
||||
(setq flycheck-mode-line '(:eval (concat (flycheck-mode-line-status-text) " ")))
|
||||
:config
|
||||
(setq-default flycheck-disabled-checkers '(python-flake8)) ;; disable the python-flake8 checker. This will make the next checker which is python-pylint to be used.
|
||||
(setq flycheck-check-syntax-automatically '(save mode-enabled)) ;; flycheck only while saving, default is (save idle-change new-line mode-enabled)
|
||||
(setq flycheck-emacs-lisp-load-path 'inherit) )
|
||||
|
||||
;; flycheck also has tooltips
|
||||
;; flycheck-pos-tip shows errors under point in pos-tip popups.
|
||||
;;(require 'flycheck-pos-tip)
|
||||
;;(with-eval-after-load 'flycheck
|
||||
;; (flycheck-pos-tip-mode))
|
||||
(use-package flycheck-posframe
|
||||
;; https://melpa.org/#/flycheck-posframe
|
||||
:after (flycheck)
|
||||
:if (display-graphic-p)
|
||||
:init (require 'flycheck-posframe-autoloads)
|
||||
:config
|
||||
(add-hook 'flycheck-mode-hook #'flycheck-posframe-mode)
|
||||
(setq flycheck-posframe-position 'window-bottom-left-corner)
|
||||
(setq flycheck-posframe-info-prefix "➤ ")
|
||||
(setq flycheck-posframe-warning-prefix "➤ ") ;; "➤ " "\u26a0 "
|
||||
(setq flycheck-posframe-error-prefix "➤ ")
|
||||
(setq flycheck-posframe-border-use-error-face t)
|
||||
(setq flycheck-posframe-border-width 1)
|
||||
(set-face-attribute 'flycheck-posframe-info-face nil
|
||||
:inherit nil
|
||||
:foreground (plist-get (face-attribute 'flycheck-info :underline) :color))
|
||||
(set-face-attribute 'flycheck-posframe-warning-face nil
|
||||
:inherit nil
|
||||
:foreground (plist-get (face-attribute 'flycheck-warning :underline) :color))
|
||||
(set-face-attribute 'flycheck-posframe-error-face nil :inherit 'error
|
||||
:inherit nil
|
||||
:foreground (plist-get (face-attribute 'flycheck-error :underline) :color))
|
||||
;; (set-face-attribute 'flycheck-posframe-border-face nil :inherit nil :foreground "#dc752f")
|
||||
)
|
||||
|
||||
(provide 'syntax-checking-settings)
|
||||
;;; syntax-checking-settings.el ends here
|
||||
|
||||
Reference in New Issue
Block a user