• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: October 26th, 2023

help-circle

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

  • You are doing it completely wrong

    I use :custom a LOT. Config is so clean and short compare to default setup.

    (use-package magit
      :ensure t
      :defer t
      :functions magit-status
      :custom-face
      (magit-diff-added ((t (:background "dark slate gray" :foreground "chocolate"))))
      (magit-diff-added-highlight ((t (:background "dark olive green" :foreground "gold"))))
      (magit-diff-removed ((t (:background "red" :foreground "#ffdddd"))))
      (magit-diff-removed-highlight ((t (:background "dark red" :foreground "navajo white"))))
      :custom
      (magit-diff-refine-hunk                'all)
      (magit-display-buffer-function         'magit-display-buffer-fullframe-status-v1)
      (magit-ediff-dwim-show-on-hunks        t)
      (magit-log-arguments                   '("--graph" "--color" "--decorate" "--show-signature" "--follow" "-n256"))
      (magit-log-margin-show-committer-date  t)
      (magit-log-remove-graph-args           '("--follow" "--grep" "-G" "-S" "-L"))
      (magit-todos-insert-after              '(bottom))
      :bind(
      ("C-x C-z" . magit-status)
      :map evil-normal-state-map
      ("gs"  . magit-status)
      )
    )