mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor!(go): remove go-eldoc & company-go
BREAKING CHANGE: This removes company and non-LSP integration from the Go module, in order to reduce the complexity of the module, reduce dependencies on Company, and lean more on LSP, which provides these features with more reliability and consistency. Switch to :tools lsp and install a Go LSP client to get these features back.
This commit is contained in:
@ -9,9 +9,8 @@
|
|||||||
(set-lookup-handlers! 'go-mode
|
(set-lookup-handlers! 'go-mode
|
||||||
:documentation #'godoc-at-point)
|
:documentation #'godoc-at-point)
|
||||||
|
|
||||||
(if (modulep! +lsp)
|
(when (modulep! +lsp)
|
||||||
(add-hook 'go-mode-local-vars-hook #'lsp! 'append)
|
(add-hook 'go-mode-local-vars-hook #'lsp! 'append))
|
||||||
(add-hook 'go-mode-hook #'go-eldoc-setup))
|
|
||||||
|
|
||||||
(when (modulep! +tree-sitter)
|
(when (modulep! +tree-sitter)
|
||||||
(add-hook 'go-mode-local-vars-hook #'tree-sitter! 'append))
|
(add-hook 'go-mode-local-vars-hook #'tree-sitter! 'append))
|
||||||
@ -52,15 +51,6 @@
|
|||||||
:commands gorepl-run-load-current-file)
|
:commands gorepl-run-load-current-file)
|
||||||
|
|
||||||
|
|
||||||
(use-package! company-go
|
|
||||||
:when (modulep! :completion company)
|
|
||||||
:unless (modulep! +lsp)
|
|
||||||
:after go-mode
|
|
||||||
:config
|
|
||||||
(set-company-backend! 'go-mode 'company-go)
|
|
||||||
(setq company-go-show-annotation t))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! flycheck-golangci-lint
|
(use-package! flycheck-golangci-lint
|
||||||
:when (modulep! :checkers syntax -flymake)
|
:when (modulep! :checkers syntax -flymake)
|
||||||
:hook (go-mode . flycheck-golangci-lint-setup))
|
:hook (go-mode . flycheck-golangci-lint-setup))
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; lang/go/packages.el
|
;;; lang/go/packages.el
|
||||||
|
|
||||||
(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd")
|
|
||||||
(package! go-mode :pin "0ed3c5227e7f622589f1411b4939c3ee34711ebd")
|
(package! go-mode :pin "0ed3c5227e7f622589f1411b4939c3ee34711ebd")
|
||||||
(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07")
|
(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07")
|
||||||
(package! go-tag :pin "33f2059551d5298ca228d90f525b99d1a8d70364")
|
(package! go-tag :pin "33f2059551d5298ca228d90f525b99d1a8d70364")
|
||||||
(package! go-gen-test :pin "af00a9abbaba2068502327ecdef574fd894a884b")
|
(package! go-gen-test :pin "af00a9abbaba2068502327ecdef574fd894a884b")
|
||||||
|
|
||||||
(when (modulep! :completion company)
|
|
||||||
(package! company-go :pin "31948b463f2fc18f8801e5a8fe511fef300eb3dd"))
|
|
||||||
|
|
||||||
(when (modulep! :checkers syntax -flymake)
|
(when (modulep! :checkers syntax -flymake)
|
||||||
(package! flycheck-golangci-lint :pin "424ba1b3a13f5548c440b7a25822932ad4b51cd6"))
|
(package! flycheck-golangci-lint :pin "424ba1b3a13f5548c440b7a25822932ad4b51cd6"))
|
||||||
|
Reference in New Issue
Block a user