From 76810aeff807b0ac6f70a566ac13b4d41a06e0f7 Mon Sep 17 00:00:00 2001 From: James Nguyen Date: Fri, 19 Jan 2018 14:42:01 -0800 Subject: [PATCH] Add go-mode This still needs to be fleshed out more. --- evil-collection-go-mode.el | 42 ++++++++++++++++++++++++++++++++++++++ evil-collection.el | 1 + 2 files changed, 43 insertions(+) create mode 100644 evil-collection-go-mode.el diff --git a/evil-collection-go-mode.el b/evil-collection-go-mode.el new file mode 100644 index 0000000..064a87a --- /dev/null +++ b/evil-collection-go-mode.el @@ -0,0 +1,42 @@ +;;; evil-collection-go-mode.el --- Bindings for `go-mode'. -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen +;; Maintainer: James Nguyen +;; Pierre Neidhardt +;; URL: https://github.com/jojojames/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "25.1")) +;; Keywords: evil, emacs, tools, golang + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;;; Bindings for `go-mode'. +(require 'evil) +(require 'go-mode nil t) + +;;; Code: +(defun evil-collection-go-mode-setup () + "Set up `evil' bindings for `go-mode'." + (evil-define-key 'normal go-mode-map + "gd" 'godef-jump + "K" 'godef-describe) + (evil-define-key 'normal godoc-mode-map + "q" 'quit-window + "g?" 'describe-mode)) + +(provide 'evil-collection-go-mode) +;;; evil-collection-go-mode.el ends here diff --git a/evil-collection.el b/evil-collection.el index 7d6d647..1f2af42 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -86,6 +86,7 @@ or evil-collection.") flycheck geiser ggtags + go-mode help helm ibuffer