.emacs.d/elisp/init-flycheck.el
2020-01-13 15:14:54 +01:00

65 lines
2.1 KiB
EmacsLisp

;;; init-flycheck.el --- -*- lexical-binding: t -*-
;;
;; Filename: init-flycheck.el
;; Description: Initialize Flycheck
;; Author: Mingde (Matthew) Zeng
;; Copyright (C) 2019 Mingde (Matthew) Zeng
;; Created: Fri Mar 15 10:08:22 2019 (-0400)
;; Version: 2.0.0
;; Last-Updated: Thu Aug 8 16:05:47 2019 (-0400)
;; By: Mingde (Matthew) Zeng
;; URL: https://github.com/MatthewZMD/.emacs.d
;; Keywords: M-EMACS .emacs.d flycheck
;; Compatibility: emacs-version >= 26.1
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; This initializes flycheck
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or (at
;; your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
;; FlyCheckPac
(use-package flycheck
:defer t
:hook (prog-mode . flycheck-mode)
:custom
(flycheck-emacs-lisp-load-path 'inherit)
:config
(add-hook 'flycheck-after-syntax-check-hook 'flycheck-autolist-hook)
(flycheck-add-mode 'javascript-eslint 'js-mode)
(flycheck-add-mode 'typescript-tslint 'rjsx-mode))
;; -FlyCheckPac
(use-package flycheck-pos-tip
:after (flycheck)
:config
(add-hook 'flycheck-mode-hook 'flycheck-pos-tip-mode))
(use-package flycheck-color-mode-line
:after (flycheck)
:config
(add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode))
(provide 'init-flycheck)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-flycheck.el ends here