aboutsummaryrefslogtreecommitdiffstats
path: root/oni-cmake.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-05-01 16:37:58 -0700
committerGravatar Tom Willemse2019-05-01 16:37:58 -0700
commit2a139282e77e250f3a9c3ac1c1fc87ba0777890b (patch)
treec39e82e12ea3d260642ba69ba2c81a9fc3295ec5 /oni-cmake.el
parentb19178d1a4208347bbdedfa1a5d22843d9bf6186 (diff)
downloademacs-config-2a139282e77e250f3a9c3ac1c1fc87ba0777890b.tar.gz
emacs-config-2a139282e77e250f3a9c3ac1c1fc87ba0777890b.zip
Add flycheck checker for CMake, enable Eldoc
Diffstat (limited to 'oni-cmake.el')
-rw-r--r--oni-cmake.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/oni-cmake.el b/oni-cmake.el
index 7019583..869b049 100644
--- a/oni-cmake.el
+++ b/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")))