working lsp with cquery
This commit is contained in:
parent
fb94a22ec9
commit
57c0927448
1 changed files with 11 additions and 52 deletions
63
config.org
63
config.org
|
|
@ -872,36 +872,18 @@ On-the-fly syntax checking.
|
|||
** LSP
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; (use-package company-lsp
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (push 'company-lsp company-backends)
|
||||
;; (add-hook 'after-init-hook 'global-company-mode)
|
||||
;; )
|
||||
(defun cquery//enable ()
|
||||
(condition-case nil
|
||||
(lsp-cquery-enable)
|
||||
(user-error nil)))
|
||||
|
||||
;; (use-package lsp-mode
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (add-hook 'prog-mode-hook lsp-mode)
|
||||
;; )
|
||||
|
||||
;; (use-package lsp-ui
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (require 'lsp-mode)
|
||||
;; (add-hook 'lsp-mode-hook 'lsp-ui-mode)
|
||||
;; )
|
||||
|
||||
;; (defun cquery//enable ()
|
||||
;; (condition-case nil
|
||||
;; (lsp-cquery-enable)
|
||||
;; (user-error nil)))
|
||||
|
||||
;; (use-package cquery
|
||||
;; :init
|
||||
;; (setq cquery-executable "/usr/bin/cquery")
|
||||
;; (add-hook 'c-mode-hook #'cquery//enable)
|
||||
;; (add-hook 'c++-mode-hook #'cquery//enable))
|
||||
(use-package cquery
|
||||
:ensure t
|
||||
:init
|
||||
(setq cquery-executable "/usr/bin/cquery")
|
||||
(add-hook 'c-mode-hook #'cquery//enable)
|
||||
(add-hook 'c++-mode-hook #'cquery//enable)
|
||||
)
|
||||
|
||||
;; (use-package ccls
|
||||
;; :ensure t
|
||||
|
|
@ -909,19 +891,6 @@ On-the-fly syntax checking.
|
|||
;; (setq ccls-executable "/usr/bin/ccls")
|
||||
;; )
|
||||
|
||||
;; (use-package eglot
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (add-hook 'c-mode-hook 'eglot-ensure)
|
||||
;; )
|
||||
|
||||
;; (use-package lsp-mode
|
||||
;; :ensure t
|
||||
;; :preface (setq lsp-enable-flycheck nil
|
||||
;; lsp-enable-indentation nil
|
||||
;; lsp-highlight-symbol-at-point nil)
|
||||
;; )
|
||||
|
||||
(use-package lsp-ui
|
||||
:ensure t
|
||||
:init (add-hook 'lsp-after-open-hook #'lsp-ui-mode)
|
||||
|
|
@ -943,16 +912,6 @@ On-the-fly syntax checking.
|
|||
company-lsp-async t)
|
||||
)
|
||||
|
||||
(use-package lsp-clangd
|
||||
:ensure t
|
||||
:config
|
||||
(lsp-define-stdio-client lsp-clangd-c
|
||||
"c"
|
||||
#'projectile-project-root
|
||||
'("/usr/bin/clangd"))
|
||||
(add-hook 'c-mode-hook #'lsp-clangd-c-enable)
|
||||
)
|
||||
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue