cradlemann

joined 11 months ago
[–] cradlemann@alien.top 1 points 10 months ago

I use consult-ripgrep and consult-repeat to run last search again.

[–] cradlemann@alien.top 1 points 11 months ago

It works fine with (electric-indent-mode -1) and

  :custom
  (go-ts-mode-indent-offset 4)
[–] cradlemann@alien.top 0 points 11 months ago (3 children)

You 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
)