From cf561f31d7b972b15b42a3ba65b8f6d6e37702b0 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 30 Apr 2021 06:49:36 -0700 Subject: emacs: enable staticcheck with lsp --- emacs/custom/fcuny-prog.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs/custom') 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 -- cgit 1.4.1