Emacs: Rearrange clangd argument stuff.
This commit is contained in:
parent
5906b26237
commit
1b3fcad20e
|
@ -1,6 +1,6 @@
|
||||||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
;;; 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:
|
;;; Commentary:
|
||||||
|
|
||||||
|
@ -319,19 +319,19 @@ purpose or not wide enough."
|
||||||
:after (whitespace company)
|
:after (whitespace company)
|
||||||
:defines (lsp-clients-clangd-args)
|
:defines (lsp-clients-clangd-args)
|
||||||
|
|
||||||
:custom
|
:init
|
||||||
(lsp-prefer-flymake nil) ; Disable flymake.
|
(defvar my/clangd-args "-compile-commands-dir=build")
|
||||||
(lsp-auto-guess-root t) ; Don't ask for project root.
|
|
||||||
(lsp-eldoc-render-all t) ; Display all eldoc information.
|
|
||||||
|
|
||||||
:config
|
|
||||||
;; Add “-clang-tidy” to clangd args if the version supports it.
|
;; Add “-clang-tidy” to clangd args if the version supports it.
|
||||||
(if (>= (cdr (company-clang-version)) 9.0)
|
(if (>= (cdr (company-clang-version)) 9.0)
|
||||||
(setq lsp-clients-clangd-args
|
(setq my/clangd-args (concat my/clangd-args " -clang-tidy")))
|
||||||
'("-compile-commands-dir=build -clang-tidy"))
|
|
||||||
(setq lsp-clients-clangd-args
|
|
||||||
'("-compile-commands-dir=build")))
|
|
||||||
|
|
||||||
|
: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 ()
|
(defun my/lsp-ws-toggle ()
|
||||||
(if lsp-ui-peek-mode
|
(if lsp-ui-peek-mode
|
||||||
(my/whitespace-mode-off)
|
(my/whitespace-mode-off)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user