From 1e662f3502aebe6aef8fa75f672748e71d5339a1 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Fri, 5 Feb 2021 15:15:13 -0500 Subject: [PATCH] Add path to gopls server --- README.org | 3 ++- modules/projects.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 497cca5..bdb62d4 100644 --- a/README.org +++ b/README.org @@ -1132,7 +1132,8 @@ Finally we can include the =go-mode= package, integrating it with =lsp=. #+begin_src emacs-lisp (use-package go-mode - :hook (go-mode . lsp)) + :hook (go-mode . lsp) + :custom (lsp-go-gopls-server-path "~/.go/bin/gopls")) #+end_src Apply some custom behaviour before saving: diff --git a/modules/projects.el b/modules/projects.el index 0d8dce3..400ef02 100644 --- a/modules/projects.el +++ b/modules/projects.el @@ -58,7 +58,8 @@ (setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH"))) (use-package go-mode - :hook (go-mode . lsp)) + :hook (go-mode . lsp) + :custom (lsp-go-gopls-server-path "~/.go/bin/gopls")) (defun dotfiles/go-hook () (add-hook 'before-save-hook #'lsp-format-buffer t t)