From 8e50bf05f1f4a8989b34fcbff7e53544d6e77385 Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Sun, 19 Jan 2020 00:03:37 +0100 Subject: Use eglot for LSP integration --- init.el | 1 + lisp/init-eglot.el | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 lisp/init-eglot.el diff --git a/init.el b/init.el index de3eb2f..91c0a82 100644 --- a/init.el +++ b/init.el @@ -37,6 +37,7 @@ (require 'init-flymake) (require 'init-org) (require 'init-rust-mode) +(require 'init-eglot) ;; local settings (optional) (require 'init-local nil t) diff --git a/lisp/init-eglot.el b/lisp/init-eglot.el new file mode 100644 index 0000000..958064e --- /dev/null +++ b/lisp/init-eglot.el @@ -0,0 +1,15 @@ +(use-package eglot + :hook + ;; enable eglot in go-mode + (go-mode . eglot-ensure) + :bind (:map eglot-mode-map + ;; C-c r renames identifier + ("C-c r" . eglot-rename) + ;; C-c p formats buffer + ("C-c p" . eglot-format)) + :config + ;; disable imenu integration as it's currently unsupported + ;; https://github.com/joaotavora/eglot/pull/303 + (setq eglot-stay-out-of '("imenu"))) + +(provide 'init-eglot) -- cgit v1.2.3