LSP: Add some clangd arguments.
This commit is contained in:
parent
4e1632ee2d
commit
548a230859
|
@ -34,9 +34,16 @@
|
|||
;; (lsp-face-semhl-enum ((t (:inherit font-lock-type-face))))
|
||||
:config (progn
|
||||
(setq lsp-clients-clangd-args '("--compile-commands-dir=build"))
|
||||
;; Add “-clang-tidy” to clangd args if the version supports it.
|
||||
(when (>= (my/clangd-version) 9.0)
|
||||
(add-to-list 'lsp-clients-clangd-args "--clang-tidy" t))
|
||||
;; Ranking algorithm trained on snippets from a large C++ codebase.
|
||||
(when (>= (my/clangd-version) 12.0)
|
||||
(add-to-list 'lsp-clients-clangd-args
|
||||
"--ranking-model=decision_forest" t))
|
||||
;; Always enabled in >= 12.0
|
||||
(when (< (my/clangd-version) 12.0)
|
||||
(add-to-list 'lsp-clients-clangd-args "--recovery-ast" t)
|
||||
(add-to-list 'lsp-clients-clangd-args "--background-index" t))
|
||||
;; Mark lsp-clients-clangd-args as safe to override.
|
||||
(put 'lsp-clients-clangd-args 'safe-local-variable #'consp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user