Emacs: Oops, lsp-clients-clangd-args is a list.
This commit is contained in:
parent
1b3fcad20e
commit
6862c76d71
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-01-26T01:29:29+0100>
|
||||
;; Time-stamp: <2020-01-26T01:52:05+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -317,21 +317,19 @@ purpose or not wide enough."
|
|||
(use-package lsp-mode
|
||||
:if (executable-find "clangd")
|
||||
:after (whitespace company)
|
||||
:defines (lsp-clients-clangd-args)
|
||||
|
||||
: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 my/clangd-args (concat my/clangd-args " -clang-tidy")))
|
||||
:define (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.
|
||||
(lsp-clients-clangd-args '(my/clang-args)) ; Arguments to clangd.
|
||||
(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
|
||||
(setq lsp-clients-clangd-args '("-compile-commands-dir=build"))
|
||||
;; Add “-clang-tidy” to clangd args if the version supports it.
|
||||
(if (>= (cdr (company-clang-version)) 9.0)
|
||||
(add-to-list 'lsp-clients-clangd-args "-clang-tidy" t))
|
||||
|
||||
(defun my/lsp-ws-toggle ()
|
||||
(if lsp-ui-peek-mode
|
||||
(my/whitespace-mode-off)
|
||||
|
|
Loading…
Reference in New Issue
Block a user