comparison .elisp/settings/80.go.el @ 332:ec41fb19c4c8

go-eldoc: try and fix go-eldoc
author Augie Fackler <raf@durin42.com>
date Tue, 11 Mar 2014 14:00:31 -0400
parents aa5afa13e12c
children
comparison
equal deleted inserted replaced
331:ecb85d3ba960 332:ec41fb19c4c8
3 ;; enable tabs 3 ;; enable tabs
4 (setq tab-width 2) 4 (setq tab-width 2)
5 (setq indent-tabs-mode t) 5 (setq indent-tabs-mode t)
6 (make-variable-buffer-local 'whitespace-style) 6 (make-variable-buffer-local 'whitespace-style)
7 (setq whitespace-style '(trailing lines-tail indentation trailing empty)) 7 (setq whitespace-style '(trailing lines-tail indentation trailing empty))
8 (go-eldoc-setup)
8 ) 9 )
9 10
10 (defun af-get-go-elisp-location () 11 (defun af-get-go-elisp-location ()
11 (let* ((gobinary (shell-command-to-string "which go")) 12 (let* ((gobinary (shell-command-to-string "which go"))
12 (gobin (substring (let ((x (file-name-directory gobinary))) 13 (gobin (substring (let ((x (file-name-directory gobinary)))
29 (progn 30 (progn
30 (message "Go is installed, loading go-mode") 31 (message "Go is installed, loading go-mode")
31 (add-to-list 'load-path goloc) 32 (add-to-list 'load-path goloc)
32 (require 'go-mode) 33 (require 'go-mode)
33 (add-hook 'go-mode-hook 'af-go-hook) 34 (add-hook 'go-mode-hook 'af-go-hook)
34 (add-hook 'go-mode-hook 'go-eldoc-setup)
35 (let* ((loc (af-get-gocode-elisp-location)) 35 (let* ((loc (af-get-gocode-elisp-location))
36 (el (concat loc "/company-go.el"))) 36 (el (concat loc "/company-go.el")))
37 (if (file-exists-p el) 37 (if (file-exists-p el)
38 (progn 38 (progn
39 (message "Found gocode, loading company-mode support...") 39 (message "Found gocode, loading company-mode support...")