diff options
author | Franck Cuny <franck.cuny@gmail.com> | 2019-12-23 16:17:09 -0800 |
---|---|---|
committer | Franck Cuny <franck.cuny@gmail.com> | 2019-12-23 16:17:09 -0800 |
commit | 43c1ca770e23b335400fb8864bc5769aa02d023a (patch) | |
tree | 4e9d35606fb0c8b0919868958f4e120a78efb9f4 /emacs | |
parent | emacs: fontify markdown. (diff) | |
download | emacs.d-43c1ca770e23b335400fb8864bc5769aa02d023a.tar.gz |
emacs: use eglot for LSP
I'm giving LSP a try with go, and I've decided to go with eglot for now, instead of lsp-mode. I gave a try to lsp-mode and the configuration was not obvious, it was slow, it kept asking questions, and the UI was pretty awful.
Diffstat (limited to '')
-rw-r--r-- | emacs.d/custom/fcuny-prog.el | 9 | ||||
-rw-r--r-- | emacs.d/init.el | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/emacs.d/custom/fcuny-prog.el b/emacs.d/custom/fcuny-prog.el new file mode 100644 index 0000000..ab7cc05 --- /dev/null +++ b/emacs.d/custom/fcuny-prog.el @@ -0,0 +1,9 @@ +(use-package eglot + :ensure t + :config + (define-key eglot-mode-map (kbd "C-c ; g .") 'xref-find-definitions) + (define-key eglot-mode-map (kbd "C-c ; g ,") 'pop-tag-mark) + (add-to-list 'eglot-server-programs '(go-mode . ("gopls"))) + (add-hook 'go-mode-hook 'eglot-ensure)) + +(provide 'fcuny-prog) diff --git a/emacs.d/init.el b/emacs.d/init.el index 4c3cd59..64b464a 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -34,6 +34,8 @@ (require 'fcuny-org) +(require 'fcuny-prog) + (require 'fcuny-docker) (require 'fcuny-json) (require 'fcuny-protobuf) |