mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 16:24:18 +00:00
Properly exclude clangd
This commit is contained in:
parent
b9f62bcf14
commit
7044aacec9
1 changed files with 20 additions and 12 deletions
|
|
@ -32,14 +32,30 @@
|
|||
#+end_src
|
||||
* c++
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ccls
|
||||
:after lsp
|
||||
(use-package lsp-mode
|
||||
:hook
|
||||
((c-mode c++-mode objc-mode) .
|
||||
(lambda () (let ((project-root (projectile-project-p)))
|
||||
(when (and project-root
|
||||
(file-readable-p (concat project-root "/compile_commands.json")))
|
||||
(require 'ccls) (lsp)))))
|
||||
(lsp)))))
|
||||
:config
|
||||
(with-eval-after-load 'lsp-clangd
|
||||
(add-to-list 'lsp-clients-clangd-args
|
||||
"-j=16"))
|
||||
|
||||
(add-to-list 'lsp-disabled-clients '(c++-mode . ccls))
|
||||
(add-to-list 'lsp-disabled-clients '(c-mode . ccls))
|
||||
(add-to-list 'lsp-disabled-clients '(objc-mode . ccls)))
|
||||
|
||||
(use-package ccls
|
||||
:after lsp-mode
|
||||
:hook
|
||||
((c-mode c++-mode objc-mode) .
|
||||
(lambda () (let ((project-root (projectile-project-p)))
|
||||
(when (and project-root
|
||||
(file-readable-p (concat project-root "/compile_commands.json")))
|
||||
(lsp)))))
|
||||
:config
|
||||
(setq ccls-sem-highlight-method 'font-lock-mode)
|
||||
(setq ccls-initialization-options
|
||||
|
|
@ -54,15 +70,7 @@
|
|||
(when my-ec/at-ti
|
||||
(add-to-list 'exec-path
|
||||
"/db/sds/packagse2/ccls-master")
|
||||
(setq ccls-executable "/db/sds/packages2/ccls-master/ccls"))
|
||||
|
||||
(with-eval-after-load 'lsp-clangd
|
||||
(add-to-list 'lsp-clients-clangd-args
|
||||
"-j=16"))
|
||||
|
||||
(add-to-list 'lsp-disabled-clients '(c++-mode . ccls))
|
||||
(add-to-list 'lsp-disabled-clients '(c-mode . ccls))
|
||||
(add-to-list 'lsp-disabled-clients '(objc-mode . ccls)))
|
||||
(setq ccls-executable "/db/sds/packages2/ccls-master/ccls")))
|
||||
#+end_src
|
||||
* Projectile
|
||||
#+begin_src emacs-lisp
|
||||
|
|
|
|||
Loading…
Reference in a new issue