From f533b9fd2f2364739540a7a7d35fd9d00ff5643e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Mon, 10 Jul 2023 06:57:22 -0700 Subject: emacs: lsp mode --- .emacs.local.d/modes/lsp.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.emacs.local.d/modes/lsp.el b/.emacs.local.d/modes/lsp.el index 1baf1b3..a565b03 100644 --- a/.emacs.local.d/modes/lsp.el +++ b/.emacs.local.d/modes/lsp.el @@ -1,18 +1,17 @@ (use-package lsp-mode :ensure t - :commands (lsp lsp-deferred) - :hook (go-mode . lsp-deferred)) - -;;Set up before-save hooks to format buffer and add/delete imports. -;;Make sure you don't have other gofmt/goimports hooks enabled. + :commands + (lsp lsp-deferred) + :hook + (dart-mode go-mode . lsp) + :init + (setq lsp-keymap-prefix "H-l") + ) (defun lsp-go-install-save-hooks () (add-hook 'before-save-hook #'lsp-format-buffer t t) (add-hook 'before-save-hook #'lsp-organize-imports t t)) -;;Optional - provides fancier overlays. (use-package lsp-ui :ensure t - :commands lsp-ui-mode - :init -) + :commands lsp-ui-mode) -- cgit v1.2.3