From 77af1ea1165d678a0b3953c43eaf7ddfc262ef68 Mon Sep 17 00:00:00 2001 From: gxlin Date: Mon, 7 Jun 2021 19:54:10 +0800 Subject: Add lsp config for vim --- .emacs.d/init.el | 1 + .emacs.d/modes/init-lsp-mode.el | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .emacs.d/modes/init-lsp-mode.el (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1d345b6..7d213be 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -36,6 +36,7 @@ (require 'init-evil-mode) (require 'init-org-mode) +(require 'init-lsp-mode) ;; ledger-mode (use-package ledger-mode diff --git a/.emacs.d/modes/init-lsp-mode.el b/.emacs.d/modes/init-lsp-mode.el new file mode 100644 index 0000000..b5c391a --- /dev/null +++ b/.emacs.d/modes/init-lsp-mode.el @@ -0,0 +1,13 @@ +(use-package lsp-mode + :ensure t + :hook + ((go-mode . lsp-deferred) + (lsp-mode . lsp-enable-which-key-integration)) + :commands (lsp lsp-deferred) + :config + (evil-define-key 'normal lsp-mode-map + (kbd "gd") 'lsp-find-definition + (kbd "gr") 'lsp-find-references) + (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.git\\'") + +(provide 'init-lsp-mode) -- cgit v1.2.3