2024-07-05 05:48:54 +00:00
|
|
|
|
2024-07-06 17:49:17 +00:00
|
|
|
(when thwap-dev-enable-go
|
|
|
|
(straight-use-package 'go-mode)
|
|
|
|
(setq lsp-go-analyses '((shadow . t)
|
|
|
|
(simplifycompositelit . :json-false)))
|
|
|
|
(when (executable-find "gopls")
|
|
|
|
(add-hook 'go-mode-hook #'lsp-deferred)
|
|
|
|
(add-hook 'go-mode-hook 'eglot-ensure))
|
|
|
|
(when (executable-find "goimports")
|
|
|
|
(setq gofmt-command "goimports"))
|
|
|
|
(add-hook 'before-save-hook 'gofmt-before-save))
|
|
|
|
|
2024-07-05 16:38:12 +00:00
|
|
|
|
|
|
|
(provide 'thwap-go)
|