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
|
** LSP
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; (use-package company-lsp
|
(defun cquery//enable ()
|
||||||
;; :ensure t
|
(condition-case nil
|
||||||
;; :config
|
(lsp-cquery-enable)
|
||||||
;; (push 'company-lsp company-backends)
|
(user-error nil)))
|
||||||
;; (add-hook 'after-init-hook 'global-company-mode)
|
|
||||||
;; )
|
|
||||||
|
|
||||||
;; (use-package lsp-mode
|
(use-package cquery
|
||||||
;; :ensure t
|
:ensure t
|
||||||
;; :config
|
:init
|
||||||
;; (add-hook 'prog-mode-hook lsp-mode)
|
(setq cquery-executable "/usr/bin/cquery")
|
||||||
;; )
|
(add-hook 'c-mode-hook #'cquery//enable)
|
||||||
|
(add-hook 'c++-mode-hook #'cquery//enable)
|
||||||
;; (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 ccls
|
;; (use-package ccls
|
||||||
;; :ensure t
|
;; :ensure t
|
||||||
|
|
@ -909,19 +891,6 @@ On-the-fly syntax checking.
|
||||||
;; (setq ccls-executable "/usr/bin/ccls")
|
;; (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
|
(use-package lsp-ui
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (add-hook 'lsp-after-open-hook #'lsp-ui-mode)
|
:init (add-hook 'lsp-after-open-hook #'lsp-ui-mode)
|
||||||
|
|
@ -943,16 +912,6 @@ On-the-fly syntax checking.
|
||||||
company-lsp-async t)
|
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
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue