Add flycheck checker for CMake, enable Eldoc
This commit is contained in:
parent
b19178d1a4
commit
2a139282e7
1 changed files with 12 additions and 2 deletions
14
oni-cmake.el
14
oni-cmake.el
|
@ -4,8 +4,8 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 20190402232459
|
||||
;; Package-Requires: (cmake-mode oni-company oni-fci cmake-font-lock)
|
||||
;; Version: 20190501161805
|
||||
;; Package-Requires: (cmake-mode oni-company oni-fci cmake-font-lock eldoc-cmake 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
|
||||
|
@ -27,9 +27,11 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'compile)
|
||||
(require 'flycheck)
|
||||
|
||||
(add-hook 'cmake-mode-hook 'cmake-font-lock-activate)
|
||||
(add-hook 'cmake-mode-hook 'company-mode)
|
||||
(add-hook 'cmake-mode-hook 'eldoc-cmake-enable)
|
||||
(add-hook 'cmake-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'cmake-mode-hook 'fci-mode)
|
||||
|
||||
|
@ -43,6 +45,14 @@
|
|||
eol)
|
||||
1 2 nil 1 1))
|
||||
|
||||
(flycheck-define-checker cmake-cmakelint
|
||||
"A CMake checker using cmakelint.
|
||||
|
||||
See URL `https://github.com/richq/cmake-lint'"
|
||||
:command ("cmakelint" source)
|
||||
:error-patterns ((error line-start (file-name) ":" line ": " (message) line-end))
|
||||
:modes cmake-mode)
|
||||
|
||||
;;;###autoload
|
||||
(with-eval-after-load 'grep
|
||||
(add-to-list 'grep-files-aliases '("cmake" . "CMakeLists.txt *.cmake")))
|
||||
|
|
Loading…
Reference in a new issue