magthe0@alien.topB to Emacs@communick.newsEnglish · 1 year agoUsing the golang mode shipped with Emacsmagnus.therning.orgexternal-linkmessage-square3fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkUsing the golang mode shipped with Emacsmagnus.therning.orgmagthe0@alien.topB to Emacs@communick.newsEnglish · 1 year agomessage-square3fedilink
minus-squarecradlemann@alien.topBlinkfedilinkEnglisharrow-up1·1 year agoYou setup looks not so optimal. Here is mine (use-package go-mode :ensure t :mode "\\.go\\'" :preface (defun vd/go-lsp-start() (add-hook 'before-save-hook #'lsp-format-buffer t t) (add-hook 'before-save-hook #'lsp-organize-imports t t) (lsp-deferred) ) :hook (go-ts-mode . vd/go-lsp-start) :bind (:map go-ts-mode-map ("RET" . newline-and-indent) ("M-RET" . newline) ) :config (add-to-list 'exec-path "~/.local/bin") (setq lsp-go-analyses '( (nilness . t) (shadow . t) (unusedwrite . t) (fieldalignment . t) ) lsp-go-codelenses '( (test . t) (tidy . t) (upgrade_dependency . t) (vendor . t) (run_govulncheck . t) ) ) ) (use-package go-tag :ensure t ) (use-package godoctor :ensure t )
You setup looks not so optimal. Here is mine