diff --git a/emacs/.emacs b/emacs/.emacs index 440c0fa..2bb3d41 100755 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -100,10 +100,6 @@ :bind (("C-" . company-complete)) :hook (after-init . global-company-mode)) -(use-package ccls - :hook ((c-mode c++-mode objc-mode) . - (lambda () (require 'ccls) (lsp)))) - (use-package org :bind (("C-c a" . org-agenda) ("C-c c" . org-capture)) @@ -128,26 +124,12 @@ (use-package which-key :config (which-key-mode)) -;;; LSP -(use-package lsp-mode - :commands lsp - :hook (rust-mode . lsp) - :config (setq lsp-enable-snippet nil - lsp-file-watch-threshold nil)) - -(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) +;;; Eglot +(use-package eglot + :hook ((c-mode c++-mode objc-mode) . + 'eglot-ensure) + :config (add-to-list 'eglot-server-programs + '((c++-mode c-mode objc-mode) "clangd"))) (defmacro global-set-keys (&rest map) (let (a)