Ditch ccls and lsp in favor of eglot and clangd

This commit is contained in:
2021-04-19 15:32:46 +03:00
parent a10a12c210
commit 10430dd2a3

View File

@@ -100,10 +100,6 @@
:bind (("C-<tab>" . company-complete)) :bind (("C-<tab>" . company-complete))
:hook (after-init . global-company-mode)) :hook (after-init . global-company-mode))
(use-package ccls
:hook ((c-mode c++-mode objc-mode) .
(lambda () (require 'ccls) (lsp))))
(use-package org (use-package org
:bind (("C-c a" . org-agenda) :bind (("C-c a" . org-agenda)
("C-c c" . org-capture)) ("C-c c" . org-capture))
@@ -128,26 +124,12 @@
(use-package which-key (use-package which-key
:config (which-key-mode)) :config (which-key-mode))
;;; LSP ;;; Eglot
(use-package lsp-mode (use-package eglot
:commands lsp :hook ((c-mode c++-mode objc-mode) .
:hook (rust-mode . lsp) 'eglot-ensure)
:config (setq lsp-enable-snippet nil :config (add-to-list 'eglot-server-programs
lsp-file-watch-threshold nil)) '((c++-mode c-mode objc-mode) "clangd")))
(use-package lsp-ui
:commands lsp-ui-mode
:config (setq lsp-ui-doc-enable nil
lsp-ui-peek-enable t
lsp-ui-sideline-enable nil
lsp-ui-imenu-enable nil
lsp-ui-flycheck-enable t)
:bind (:map lsp-ui-mode-map
([remap xref-find-references] . lsp-ui-peek-find-references)
([remap xref-find-apropos] . lsp-ui-peek-workspace-symbol)))
(use-package company-lsp
:commands company-lsp)
(defmacro global-set-keys (&rest map) (defmacro global-set-keys (&rest map)
(let (a) (let (a)