From 909cadac02ef5582aff0dec727763ccb98956d73 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Mon, 10 Aug 2020 18:06:51 -0400 Subject: [PATCH] ENH add C (bout time) --- etc/conf.org | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/etc/conf.org b/etc/conf.org index bd3023c..6fca701 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -860,6 +860,38 @@ Flycheck syntax checkers (advice-add #'flycheck-default-executable-find :around #'nd/flycheck-find-exe-no-docker) #+END_SRC +*** C +#+BEGIN_SRC emacs-lisp +(defun nd/init-c-company () + "Set the company backends for anaconda mode." + (setq-local company-backends '(company-c-headers + company-dabbrev-code + company-irony))) + +;; requires clang (duh) +(use-package flycheck-clang-analyzer + :straight t + :after flycheck + :config + (flycheck-clang-analyzer-setup)) + +;; requires cmake/llvm +(use-package irony + :straight t + :hook ((irony-mode . irony-cdb-autosetup-compile-options))) + +(use-package company-irony + :straight t) + +(use-package company-c-headers + :straight t) + +(use-package c-mode + :after flycheck + :hook ((c-mode . company-mode) + (c-mode . irony-mode) + (c-mode . nd/init-c-company))) +#+END_SRC *** Python **** inferior shell :PROPERTIES: