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)