diff --git a/init.d/programming/common.el b/init.d/programming/common.el index 62918a5..e12744c 100644 --- a/init.d/programming/common.el +++ b/init.d/programming/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-01-26T01:24:11+0100> +;; Time-stamp: <2020-01-26T01:29:29+0100> ;;; Commentary: @@ -319,19 +319,19 @@ purpose or not wide enough." :after (whitespace company) :defines (lsp-clients-clangd-args) - :custom - (lsp-prefer-flymake nil) ; Disable flymake. - (lsp-auto-guess-root t) ; Don't ask for project root. - (lsp-eldoc-render-all t) ; Display all eldoc information. - - :config + :init + (defvar my/clangd-args "-compile-commands-dir=build") ;; Add “-clang-tidy” to clangd args if the version supports it. (if (>= (cdr (company-clang-version)) 9.0) - (setq lsp-clients-clangd-args - '("-compile-commands-dir=build -clang-tidy")) - (setq lsp-clients-clangd-args - '("-compile-commands-dir=build"))) + (setq my/clangd-args (concat my/clangd-args " -clang-tidy"))) + :custom + (lsp-prefer-flymake nil) ; Disable flymake. + (lsp-auto-guess-root t) ; Don't ask for project root. + (lsp-eldoc-render-all t) ; Display all eldoc information. + (lsp-clients-clangd-args '(my/clang-args)) ; Arguments to clangd. + + :config (defun my/lsp-ws-toggle () (if lsp-ui-peek-mode (my/whitespace-mode-off)