From d82abbbad6e36bdc78391893acc9988b1f06b184 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 26 Jul 2016 16:46:33 +0200 Subject: emacs: added cmake support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/init.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index b9f7ee0..861323e 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -51,6 +51,7 @@ (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) +(set-language-environment 'utf-8) ;; User name and email. (setq user-full-name "Miquel Sabaté Solà" @@ -556,4 +557,22 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (yas-reload-all) (add-hook 'prog-mode-hook #'yas-minor-mode)) +;; CMake +(use-package cmake-mode + :ensure t + :config + + (setq auto-mode-alist + (append + '(("CMakeLists\\.txt\\'" . cmake-mode)) + '(("\\.cmake\\'" . cmake-mode)) + auto-mode-alist)) + + (use-package cmake-font-lock + :ensure t + :config + + (add-hook 'cmake-mode-hook 'cmake-font-lock-activate) + (add-hook 'yaml-mode-hook 'warnings-mode-hook))) + ;;; init.el ends here -- cgit v1.2.3