Browse Source

Setup packages for go

master
Nicolas Petton 1 year ago
parent
commit
095ca7c949
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      init.el

+ 22
- 0
init.el View File

@ -157,6 +157,12 @@
(setq company-dabbrev-ignore-case t)
(setq company-dabbrev-downcase nil)))
(use-package company-go
:after go-mode
:config (progn
(add-to-list 'company-backends #'company-go)
(setq company-go-show-annotation t)))
(use-package compile
:hook (compilation-filter . my/colorize-compilation-buffer)
:config
@ -319,6 +325,22 @@
(use-package flyspell-correct-ivy
:bind* (("C-." . flyspell-correct-word-generic)))
(use-package go-eldoc
:after go-mode
:hook (go-mode . setup-go-mode)
:config (progn
(defun setup-go-mode ()
(add-hook 'before-save-hook #'gofmt nil t)
(go-eldoc-setup))))
(use-package go-mode
:bind (:map go-mode-map
("M-." . godef-jump)
("C-c d" . godoc-at-point))
:init (progn
(add-to-list 'exec-path (format "%s/.local/share/go/bin" (getenv "HOME")))
(setenv "GOPATH" (format "%s/.local/share/go" (getenv "HOME")))))
(use-package gnus-dired
:bind (:map gnus-dired-mode-map
("C-x C-a" . gnus-dired-attach))


Loading…
Cancel
Save