From 88ab401adc83bea6e1f571c54093dbc7f521e080 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Jan 2021 19:52:04 -0800 Subject: emacs: rename the directory --- emacs/custom/fcuny-flycheck.el | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 emacs/custom/fcuny-flycheck.el (limited to 'emacs/custom/fcuny-flycheck.el') diff --git a/emacs/custom/fcuny-flycheck.el b/emacs/custom/fcuny-flycheck.el new file mode 100644 index 0000000..e1805b2 --- /dev/null +++ b/emacs/custom/fcuny-flycheck.el @@ -0,0 +1,27 @@ +(eval-when-compile + (require 'use-package) + (require 'fcuny-flycheck-py)) + +(use-package flycheck + :ensure t + :hook (prog-mode . flycheck-mode ) + :custom + (flycheck-idle-change-delay 2) + (flycheck-emacs-lisp-load-path 'inherit) + (flycheck-highlighting-mode 'lines) + (flycheck-check-syntax-automatically '(mode-enabled save)) + (flycheck-disabled-checkers '(emacs-lisp-checkdoc)) + :config + (progn + (flycheck-define-checker fcuny/source-check-python + "A syntax checker for python source code in Source, using `check.pex'" + :command ("check.pex" source) + ;;; errors are reported like this: + ;;; E241:ERROR : + :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end) + (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end)) + :predicate fcuny/check-source-predicate-python-p + :modes (python-mode)) + (add-to-list 'flycheck-checkers 'fcuny/source-check-python))) + +(provide 'fcuny-flycheck) -- cgit 1.4.1