From 4e93db2a9575ba97aa043d13533b7bc9667484f1 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 29 Sep 2019 02:36:24 +0200 Subject: [PATCH] Only enable/disable clang-tidy in c++ or c mode. --- init.el | 13 ++++++++----- server/server | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index 507f551..3c875ac 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,5 @@ ;;; init.el --- tastytea's Emacs init file. -;; Time-stamp: <2019-09-26T06:22:58+00:00> +;; Time-stamp: <2019-09-29T00:40:15+00:00> ;;; Commentary: ;; I am using this file with Emacs 26, but most of it will probably work with @@ -234,11 +234,14 @@ With argument, do this that many times." :config (defun my/clang-tidy-off () "Disable c++-clang-tidy." - (add-to-list 'flycheck-disabled-checkers 'c/c++-clang-tidy)) + (when (or (eq major-mode 'c++-mode) (eq major-mode 'c-mode)) + (add-to-list 'flycheck-disabled-checkers 'c/c++-clang-tidy)) + ) (defun my/clang-tidy-on () - "Enable c++-clang-tidy on." - (setq-local flycheck-disabled-checkers - (remove 'c/c++-clang-tidy flycheck-disabled-checkers)) + "Enable c++-clang-tidy." + (when (or (eq major-mode 'c++-mode) (eq major-mode 'c-mode)) + (setq-local flycheck-disabled-checkers + (remove 'c/c++-clang-tidy flycheck-disabled-checkers))) ) :hook (flycheck-mode . flycheck-clang-tidy-setup) diff --git a/server/server b/server/server index 9816e74..9242b63 100644 --- a/server/server +++ b/server/server @@ -1,2 +1,2 @@ -127.0.0.1:51313 16192 +127.0.0.1:51313 16170 phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh \ No newline at end of file