emacs golang开发配置

1,304 阅读1分钟
原文链接: github.com

Installation

To install, clone this repo to ~/.emacs.d, i.e. ensure that the init.el contained in this repo ends up at ~/.emacs.d/init.el:

git clone https://github.com/lzt1226/emacs-config.git ~/.emacs.d

Upon starting up Emacs for the first time, further third-party packages will be automatically downloaded and installed. If you encounter any errors at that stage, try restarting Emacs, and possibly running M-x package-refresh-contents before doing so.

Support

  • Ruby / Ruby on Rails
  • CSS / LESS / SASS / SCSS
  • HAML / Markdown / Textile / ERB
  • Clojure (with Cider and nRepl)
  • Javascript / Coffeescript
  • Python
  • PHP
  • Haskell
  • Elm
  • Erlang
  • Common Lisp (with Slime)
  • Important Golang

Step

  • Install go-mode,company and company-go, m-x package-install directly
  • go get -u github.com/nsf/gocode
  • go get -u github.com/rogpeppe/godef
  • go get -u github.com/dougm/goflymake
    • Modify the file .emacs.d/lisp/init-go.el
    • (add-to-list 'load-path "$GOPATH/src/github.com/dougm/goflymake")(require 'go-flymake)
    • (add-to-list 'load-path "$GOPATH/src/github.com/dougm/goflymake")(require 'go-flycheck)
    • Replace $GOPATH is your gopath
  • neotree has supported
    • Shortcut key id F8

Thanks

Support for golang was added based on the configuration of Purcell Thanks Purcell