summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-04-30 06:49:36 -0700
committerFranck Cuny <franck@fcuny.net>2021-04-30 06:49:36 -0700
commitcf561f31d7b972b15b42a3ba65b8f6d6e37702b0 (patch)
tree1a6b43a42a96bf7b2e112b3ccd8b0947a940e66e /emacs
parentemacs: configure compile mode (diff)
downloademacs.d-cf561f31d7b972b15b42a3ba65b8f6d6e37702b0.tar.gz
emacs: enable staticcheck with lsp
Diffstat (limited to '')
-rw-r--r--emacs/custom/fcuny-prog.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/custom/fcuny-prog.el b/emacs/custom/fcuny-prog.el
index 990f3aa..2f24a08 100644
--- a/emacs/custom/fcuny-prog.el
+++ b/emacs/custom/fcuny-prog.el
@@ -16,6 +16,10 @@
   (company-tooltip-limit 12)
   (company-idle-delay 1))
 
+;; we need to install the following tools:
+;; go get golang.org/x/tools/gopls@latest
+;; go get golang.org/x/lint/golint@latest
+;; go get honnef.co/go/tools/cmd/staticcheck
 (use-package lsp-mode
   :ensure t
   :commands (lsp lsp-deferred)
@@ -25,6 +29,9 @@
                                  (lsp-enable-which-key-integration)))))
   :config
   (define-key lsp-mode-map (kbd "C-c l") lsp-command-map)
+  (lsp-register-custom-settings
+   '(("gopls.completeUnimported" t t)
+     ("gopls.staticcheck" t t)))
   :bind
   (("C-c l i" . lsp-ui-imenu))
   :custom
@@ -35,6 +42,7 @@
   (lsp-completion-provider :capf)
   (lsp-completion-enable t)
   (lsp-enable-indentation t)
+  (lsp-eldoc-render-all t)
   (lsp-prefer-flymake nil))
 
 (use-package lsp-ui