Browse Source

Add path to gopls server

main
parent
commit
1e662f3502
  1. 3
      README.org
  2. 3
      modules/projects.el

3
README.org

@ -1132,7 +1132,8 @@ Finally we can include the =go-mode= package, integrating it with =lsp=.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package go-mode (use-package go-mode
:hook (go-mode . lsp))
:hook (go-mode . lsp)
:custom (lsp-go-gopls-server-path "~/.go/bin/gopls"))
#+end_src #+end_src
Apply some custom behaviour before saving: Apply some custom behaviour before saving:

3
modules/projects.el

@ -58,7 +58,8 @@
(setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH"))) (setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH")))
(use-package go-mode (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 () (defun dotfiles/go-hook ()
(add-hook 'before-save-hook #'lsp-format-buffer t t) (add-hook 'before-save-hook #'lsp-format-buffer t t)

Loading…
Cancel
Save