• edkolev@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use go-ts-mode on a daily basis!

    When I switched to go-ts-mode I found a missing feature - so I contributed it! Here it is:

    “Extend go-ts-mode with command to add docstring to function”

    https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f0971f94fe42224b4d85bb8b6188d5d805689ddf

    I’ve done similar contributions - I encourage you do to the same if there’s a feature that you need

    https://git.savannah.gnu.org/cgit/emacs.git/log/?qt=author&q=Evgeni+Kolev

  • cradlemann@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    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
    )
    
  • mekeor@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Does anybody else have problems with go-ts-mode, especially when invoking fill-paragraph in a comment?