Skip to content

Commit

Permalink
gopls
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Aug 26, 2019
1 parent 3ddd5e5 commit 3bb5020
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dot-emacs
Expand Up @@ -1379,9 +1379,10 @@ surrounding xml expression"
(add-hook 'go-mode-hook 'go-eldoc-setup)
(add-hook 'go-mode-hook 'my-go-mode-hook)
(defun my-go-mode-hook ()
(set (make-local-variable 'company-backends) '(company-go))
(set (make-local-variable 'company-minimum-prefix-length) 2)
(local-set-key (kbd "M-.") 'godef-jump))
;;(set (make-local-variable 'company-backends) '(company-go))
;; (set (make-local-variable 'company-minimum-prefix-length) 2)
;; (local-set-key (kbd "M-.") 'godef-jump)
(lsp-deferred))
(when (fboundp 'gofmt-before-save)
(add-hook 'before-save-hook 'gofmt-before-save)
(add-to-list 'safe-local-variable-values '(gofmt-command . "goimports"))
Expand All @@ -1394,6 +1395,12 @@ surrounding xml expression"
(when (equal (cadr govet) "tool")
(setf (cdr govet) (cddr govet))))

;; lsp configuration
(defun my-lsp-mode-hook ()
)
(setq lsp-ui-sideline-enable nil)
(add-hook 'lsp-mode-hook 'my-lsp-mode-hook)

;; protobufs
(require 'protobuf-mode)
(add-to-list 'auto-mode-alist (cons "\\.proto$" 'protobuf-mode))
Expand Down

0 comments on commit 3bb5020

Please sign in to comment.