Skip to content

Commit 1846707

Browse files
committed
golang-mode
1 parent aea87af commit 1846707

File tree

12 files changed

+1541
-50
lines changed

12 files changed

+1541
-50
lines changed

.emacs.desktop

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
;; --------------------------------------------------------------------------
33
;; Desktop File for Emacs
44
;; --------------------------------------------------------------------------
5-
;; Created Sat May 10 18:24:54 2014
5+
;; Created Sat May 10 22:06:43 2014
66
;; Desktop file format version 206
77
;; Emacs version 24.3.1
88

99
;; Global section:
1010
(setq comint-input-ring nil)
11-
(setq compile-history nil)
11+
(setq compile-history '("make -k "))
1212
(setq desktop-missing-file-warning nil)
13-
(setq extended-command-history '("file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
13+
(setq extended-command-history '("shell" "godoc" "shell" "godoc" "file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
1414
(setq face-name-history nil)
15-
(setq file-name-history '("~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/tmp/test.htm" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/init.el"))
15+
(setq file-name-history '("/Volumes/workspaces/eclipse/testbeego/src/testbeego.go" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/lisp/init-golang.el" "~/.emacs.d/init.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/lisp/init-auto-complete.el" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "/Users/nothingness/.emacs.d/lisp/init-golang.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/tmp/test.htm" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/init.el"))
1616
(setq grep-find-history nil)
1717
(setq grep-history nil)
18-
(setq ido-buffer-history '("*Packages*" "*Help*" "train.html" " *undo-tree*"))
19-
(setq ido-last-directory-list '(("/Users/nothingness/.emacs.d/" . "lisp/") ("/Users/nothingness/" . ".emacs.d/") ("/Volumes/workspaces/VMDE/data/workspaces/" . "027model/") ("/Volumes/workspaces/VMDE/data/" . "workspaces/") ("/Volumes/workspaces/VMDE/" . "data/") ("/Volumes/workspaces/" . "VMDE/") ("/Volumes/" . "workspaces/") ("/" . "tmp/")))
20-
(setq ido-work-directory-list '("/Users/nothingness/.emacs.d/" "/tmp/" "/Volumes/workspaces/VMDE/data/workspaces/027model/" "/Users/nothingness/Downloads/" "/Users/nothingness/"))
21-
(setq ido-work-file-list '("custom.el" "test.htm" "init.el" "train.html" "5yluyin Google‘·Ö‘Îö‘´ú‘Âë.txt" ".vimrc"))
18+
(setq ido-buffer-history '("custom.el" "init.el" "*compilation*" "init-auto-complete.el" "*Packages*" "*Help*" "train.html" " *undo-tree*"))
19+
(setq ido-last-directory-list '(("/Volumes/workspaces/eclipse/testbeego/" . "src/") ("/Volumes/workspaces/eclipse/gotest/" . "src/") ("/Volumes/workspaces/eclipse/" . "testbeego/") ("/Volumes/workspaces/gopath/" . "src/") ("/Users/nothingness/.emacs.d/" . "lisp/") ("/Users/nothingness/" . ".emacs.d/") ("/Volumes/workspaces/VMDE/data/workspaces/" . "027model/") ("/Volumes/workspaces/VMDE/data/" . "workspaces/") ("/Volumes/workspaces/VMDE/" . "data/") ("/Volumes/workspaces/" . "eclipse/") ("/Volumes/" . "workspaces/") ("/" . "Volumes/")))
20+
(setq ido-work-directory-list '("/Volumes/workspaces/eclipse/testbeego/src/" "/Volumes/workspaces/eclipse/gotest/src/" "/Users/nothingness/.emacs.d/lisp/" "/Users/nothingness/.emacs.d/" "/tmp/" "/Volumes/workspaces/VMDE/data/workspaces/027model/" "/Users/nothingness/Downloads/" "/Users/nothingness/"))
21+
(setq ido-work-file-list '("testbeego.go" "hollewold.go" "init-auto-complete.el" "init.el" "init-golang.el" "custom.el" "test.htm" "train.html" "5yluyin Google‘·Ö‘Îö‘´ú‘Âë.txt" ".vimrc"))
2222
(setq minibuffer-history nil)
2323
(setq query-replace-history nil)
2424
(setq read-expression-history nil)
2525
(setq regexp-history nil)
26-
(setq regexp-search-ring nil)
26+
(setq regexp-search-ring '("\\_<Printf\\_>"))
2727
(setq register-alist nil)
2828
(setq search-ring nil)
2929
(setq shell-command-history nil)
@@ -32,24 +32,35 @@
3232

3333
;; Buffer section -- buffers listed in same order as in buffer list:
3434
(desktop-create-buffer 206
35-
"/Users/nothingness/.emacs.d/init.el"
36-
"init.el"
37-
'emacs-lisp-mode
38-
'(linum-mode auto-complete-mode global-auto-revert-mode whitespace-cleanup-mode undo-tree-mode page-break-lines-mode whole-line-or-region-mode hes-mode guide-key-mode highlight-symbol-mode)
39-
1
40-
'(2053 nil)
35+
"/Volumes/workspaces/eclipse/testbeego/src/testbeego.go"
36+
"testbeego.go"
37+
'go-mode
38+
'(linum-mode auto-complete-mode global-auto-revert-mode whitespace-cleanup-mode undo-tree-mode whole-line-or-region-mode hes-mode guide-key-mode highlight-symbol-mode)
39+
358
40+
'(545 nil)
41+
nil
42+
nil
43+
'((indent-tabs-mode . t) (buffer-file-coding-system . utf-8-unix)))
44+
45+
(desktop-create-buffer 206
46+
"/Volumes/workspaces/eclipse/gotest/src/hollewold.go"
47+
"hollewold.go"
48+
'go-mode
49+
'(linum-mode auto-complete-mode global-auto-revert-mode whitespace-cleanup-mode undo-tree-mode whole-line-or-region-mode hes-mode guide-key-mode highlight-symbol-mode)
50+
189
51+
'(189 nil)
4152
nil
4253
nil
43-
'((buffer-file-coding-system . undecided-unix) (overwrite-mode)))
54+
'((indent-tabs-mode . t) (buffer-file-coding-system . utf-8-unix) (overwrite-mode)))
4455

4556
(desktop-create-buffer 206
46-
"/Users/nothingness/.emacs.d/custom.el"
47-
"custom.el"
57+
"/Users/nothingness/.emacs.d/lisp/init-golang.el"
58+
"init-golang.el"
4859
'emacs-lisp-mode
4960
'(linum-mode auto-complete-mode global-auto-revert-mode whitespace-cleanup-mode undo-tree-mode page-break-lines-mode whole-line-or-region-mode hes-mode guide-key-mode highlight-symbol-mode)
50-
431
51-
'(431 nil)
61+
163
62+
'(163 nil)
5263
nil
5364
nil
54-
'((buffer-file-coding-system . undecided-unix) (overwrite-mode)))
65+
'((buffer-file-coding-system . undecided-unix)))
5566

.emacs.desktop.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2601

.session

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
;;; Automatically generated on Sat May 10 18:24:53 2014
1+
;;; Automatically generated on Sat May 10 22:06:43 2014
22
;;; Invoked by nothingness@mebar using 24.3.1
3-
(setq-default kill-ring '(#("
4-
" 0 1 (fontified t)) #(";;(cust
5-
;; custom-set-variables was added by Custom.
6-
;; If you edit it by hand, you could mess it up, so be careful.
7-
;; Your init file should contain only one such instance.
8-
;; If there is more than one, they won't work right.
9-
;'(custom-safe-themes (quote (\"4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4\" default))))
10-
;;(custom-set-faces
11-
;; custom-set-faces was added by Custom.
12-
;; If you edit it by hand, you could mess it up, so be careful.
13-
;; Your init file should contain only one such instance.
14-
;; If there is more than one, they won't work right.
15-
;;)
16-
" 0 2 (face font-lock-comment-delimiter-face fontified t) 2 3 (face font-lock-comment-face fontified t) 3 7 (face font-lock-comment-face fontified t) 7 8 (fontified t) 8 9 (fontified t) 9 12 (fontified t face font-lock-comment-delimiter-face) 12 32 (fontified t face font-lock-comment-face) 32 53 (fontified t face font-lock-comment-face) 53 54 (fontified t) 54 55 (fontified t) 55 58 (fontified t face font-lock-comment-delimiter-face) 58 118 (fontified t face font-lock-comment-face) 118 119 (fontified t) 119 120 (fontified t) 120 123 (fontified t face font-lock-comment-delimiter-face) 123 176 (fontified t face font-lock-comment-face) 176 177 (fontified t) 177 178 (fontified t) 178 181 (fontified t face font-lock-comment-delimiter-face) 181 230 (fontified t face font-lock-comment-face) 230 231 (fontified t) 231 232 (fontified t) 232 233 (fontified t face font-lock-comment-delimiter-face) 233 340 (fontified t face font-lock-comment-face) 340 341 (fontified t) 341 343 (fontified t face font-lock-comment-delimiter-face) 343 360 (fontified t face font-lock-comment-face) 360 361 (fontified t) 361 362 (fontified t) 362 365 (fontified t face font-lock-comment-delimiter-face) 365 402 (fontified t face font-lock-comment-face) 402 403 (fontified t) 403 404 (fontified t) 404 407 (fontified t face font-lock-comment-delimiter-face) 407 467 (fontified t face font-lock-comment-face) 467 468 (fontified t) 468 469 (fontified t) 469 472 (fontified t face font-lock-comment-delimiter-face) 472 525 (fontified t face font-lock-comment-face) 525 526 (fontified t) 526 527 (fontified t) 527 530 (fontified t face font-lock-comment-delimiter-face) 530 579 (fontified t face font-lock-comment-face) 579 580 (fontified t) 580 581 (fontified t) 581 583 (fontified t face font-lock-comment-delimiter-face) 583 584 (fontified t face font-lock-comment-face) 584 585 (fontified t)) #("om-set-variables" 0 16 (fontified t face font-lock-comment-face)) "(setq *xemacs* (featurep 'xemacs) )" "linum-mode" #("(require 'init-themes)" 0 1 (fontified t) 1 8 (face font-lock-keyword-face fontified t) 8 10 (fontified t) 10 21 (face font-lock-constant-face fontified t) 21 22 (fontified t)) "linum" "(provide 'init)" "(require-package 'diminish)" "(require 'init-editing-utils)"))
17-
(setq-default session-file-alist '(("~/.emacs.d/init.el" 1 2053 1 nil nil 2053 (overwrite-mode)) ("~/.emacs.d/custom.el" 1 nil 1 nil nil 635 (overwrite-mode))))
18-
(setq-default file-name-history '("~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/custom.el" "/tmp/test.htm" "/Users/nothingness/.emacs.d/init.el"))
19-
(setq-default command-history '((find-file "/Users/nothingness/.emacs.d/custom.el") (find-file "/tmp/test.htm") (find-file "/Users/nothingness/.emacs.d/init.el") (find-file "~/.emacs.d/init.el" t)))
20-
(setq-default extended-command-history '("file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
21-
(setq-default ido-buffer-history '("*Packages*" "*Help*" "train.html" " *undo-tree*"))
22-
(setq-default ido-file-history '("custom.el" "test.htm" "init.el" "init-frame-hooks.el" "init-osx-keys.el" "init-utils.el" "init-compat.el" "." "train.html" "5yluyin Google分析代码.txt" ".vimrc"))
3+
(setq-default session-file-alist '(("/Volumes/workspaces/eclipse/testbeego/src/testbeego.go" 358 545 1 nil nil 19 (overwrite-mode)) ("/Volumes/workspaces/eclipse/gotest/src/hollewold.go" 189 189 1 nil nil 166 (overwrite-mode)) ("~/.emacs.d/init.el" 1 2053 1 nil nil 2053 (overwrite-mode)) ("~/.emacs.d/custom.el" 1 nil 1 nil nil 635 (overwrite-mode))))
4+
(setq-default file-name-history '("/Volumes/workspaces/eclipse/testbeego/src/testbeego.go" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/lisp/init-golang.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/lisp/init-auto-complete.el" "/Users/nothingness/.emacs.d/init.el" "/Users/nothingness/.emacs.d/lisp/init-golang.el" "/Users/nothingness/.emacs.d/custom.el" "/tmp/test.htm"))
5+
(setq-default regexp-search-ring '("\\_<Printf\\_>"))
6+
(setq-default buffer-name-history '("custom.el" "init.el" "*compilation*" "init-auto-complete.el"))
7+
(setq-default command-history '((find-file "/Volumes/workspaces/eclipse/testbeego/src/testbeego.go") (shell nil) (kill-buffer "custom.el") (insert-file "/Volumes/workspaces/eclipse/gotest/src/hollewold.go") (kill-buffer "init.el") (kill-buffer "*compilation*") (compile "make -k " nil) (godoc "net") (kill-buffer "init-auto-complete.el") (find-file "/Users/nothingness/.emacs.d/lisp/init-auto-complete.el") (find-file "/Users/nothingness/.emacs.d/init.el") (find-file "/Users/nothingness/.emacs.d/lisp/init-golang.el") (godef-jump (point)) (find-tag "ni") (godoc "net/http") (find-file "/Volumes/workspaces/eclipse/gotest/src/hollewold.go") (find-file "/Users/nothingness/.emacs.d/custom.el") (find-file "/tmp/test.htm") (find-file "~/.emacs.d/init.el" t)))
8+
(setq-default compile-history '("make -k "))
9+
(setq-default extended-command-history '("shell" "godoc" "file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
10+
(setq-default find-tag-history '("ni"))
11+
(setq-default go-godoc-history '("net" "net/http"))
12+
(setq-default ido-buffer-history '("custom.el" "init.el" "*compilation*" "init-auto-complete.el" "*Packages*" "*Help*" "train.html" " *undo-tree*"))
13+
(setq-default ido-file-history '("testbeego.go" "hollewold.go" "init-auto-complete.el" "init.el" "init-golang.el" "custom.el" "test.htm" "init-frame-hooks.el" "init-osx-keys.el" "init-utils.el" "init-compat.el" "." "train.html" "5yluyin Google分析代码.txt" ".vimrc"))
2314
(setq-default occur-collect-regexp-history '("\\1"))
24-
(setq-default smex-history '(goto-line cd shell isearch-exit package-list-packages exit-minibuffer quickurl))
15+
(setq-default smex-history '(godoc shell goto-line cd isearch-exit package-list-packages quickurl))
2516
(setq-default yes-or-no-p-history '("yes"))

auto-save-list/.saves-2601-mebar~

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/Users/nothingness/.emacs.d/init.el
2+
/Users/nothingness/.emacs.d/#init.el#
3+
/Volumes/workspaces/eclipse/testbeego/src/testbeego.go
4+
/Volumes/workspaces/eclipse/testbeego/src/#testbeego.go#
5+
/Volumes/workspaces/eclipse/gotest/src/hollewold.go
6+
/Volumes/workspaces/eclipse/gotest/src/#hollewold.go#
7+
/Users/nothingness/.emacs.d/lisp/init-golang.el
8+
/Users/nothingness/.emacs.d/lisp/#init-golang.el#

frame-restore-parameters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
((top . 44) (left . 383) (width . 80) (height . 35) (fullscreen) (alpha))
1+
((top . 36) (left . 195) (width . 107) (height . 50) (fullscreen . fullheight) (alpha))

history

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
;; -*- mode: emacs-lisp; coding: utf-8-unix -*-
22
;; Minibuffer history file, automatically generated by `savehist'.
33

4-
(setq savehist-minibuffer-history-variables '(yes-or-no-p-history file-name-history extended-command-history ido-buffer-history ido-file-history))
4+
(setq savehist-minibuffer-history-variables '(compile-history minibuffer-history go-godoc-history yes-or-no-p-history file-name-history extended-command-history ido-buffer-history ido-file-history))
5+
(setq compile-history '("make -k "))
6+
(setq go-godoc-history '("net" "net/http"))
57
(setq yes-or-no-p-history '("yes"))
6-
(setq file-name-history '("~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/tmp/test.htm" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/init.el"))
7-
(setq extended-command-history '("file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
8-
(setq ido-buffer-history '("*Packages*" "*Help*" "train.html" " *undo-tree*"))
9-
(setq ido-file-history '("custom.el" "test.htm" "init.el" "init-frame-hooks.el" "init-osx-keys.el" "init-utils.el" "init-compat.el" "." "train.html" "5yluyin Google分析代码.txt" ".vimrc"))
8+
(setq file-name-history '("/Volumes/workspaces/eclipse/testbeego/src/testbeego.go" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/lisp/init-golang.el" "~/.emacs.d/init.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/lisp/init-auto-complete.el" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/lisp/init-golang.el" "/Volumes/workspaces/eclipse/gotest/src/hollewold.go" "/Users/nothingness/.emacs.d/lisp/init-golang.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/Users/nothingness/.emacs.d/custom.el" "~/.emacs.d/init.el" "~/.emacs.d/custom.el" "~/.emacs.d/init.el" "/tmp/test.htm" "/Users/nothingness/.emacs.d/init.el" "~/.emacs.d/init.el"))
9+
(setq extended-command-history '("shell" "godoc" "shell" "godoc" "file://" "package-list-packages" "exit-minibuffer" "quickurl" "5x5" ":q" "popwin:one-window" "cd"))
10+
(setq ido-buffer-history '("custom.el" "init.el" "*compilation*" "init-auto-complete.el" "*Packages*" "*Help*" "train.html" " *undo-tree*"))
11+
(setq ido-file-history '("testbeego.go" "hollewold.go" "init-auto-complete.el" "init.el" "init-golang.el" "hollewold.go" "custom.el" "test.htm" "init-frame-hooks.el" "init-osx-keys.el" "init-utils.el" "init-compat.el" "." "train.html" "5yluyin Google分析代码.txt" ".vimrc"))

init.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
(require 'init-frame-hooks)
1515
(require 'init-xterm)
1616
(require 'init-themes)
17+
(require 'init-fonts)
1718
(require 'init-linum-mode)
1819
(require 'init-osx-keys)
1920
(require 'init-gui-frames)
@@ -29,7 +30,7 @@
2930
(require 'init-smex)
3031
(require 'init-evil)
3132

32-
33+
(require 'init-golang)
3334

3435
;;----------------------------------------------------------------------------
3536
;; Variables configured via the interactive 'customize' interface

lisp/init-fonts.el

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
;;; Character sets
2+
3+
(defcustom sanityinc/force-default-font-for-symbols nil
4+
"When non-nil, force Emacs to use your default font for symbols."
5+
:type 'boolean)
6+
7+
(defun sanityinc/maybe-use-default-font-for-symbols ()
8+
"Force Emacs to render symbols using the default font, if so configured."
9+
(when sanityinc/force-default-font-for-symbols
10+
(set-fontset-font "fontset-default" 'symbol (face-attribute 'default :family))))
11+
12+
(add-hook 'after-init-hook 'sanityinc/maybe-use-default-font-for-symbols)
13+
14+
15+
;;; Changing font sizes
16+
17+
(require 'cl)
18+
19+
(defun sanityinc/font-name-replace-size (font-name new-size)
20+
(let ((parts (split-string font-name "-")))
21+
(setcar (nthcdr 7 parts) (format "%d" new-size))
22+
(mapconcat 'identity parts "-")))
23+
24+
(defun sanityinc/increment-default-font-height (delta)
25+
"Adjust the default font height by DELTA on every frame.
26+
Emacs will keep the pixel size of the frame approximately the
27+
same. DELTA should be a multiple of 10, to match the units used
28+
by the :height face attribute."
29+
(let* ((new-height (+ (face-attribute 'default :height) delta))
30+
(new-point-height (/ new-height 10)))
31+
(dolist (f (frame-list))
32+
(with-selected-frame f
33+
;; Latest 'set-frame-font supports a "frames" arg, but
34+
;; we cater to Emacs 23 by looping instead.
35+
(set-frame-font (sanityinc/font-name-replace-size
36+
(face-font 'default)
37+
new-point-height)
38+
t)))
39+
(set-face-attribute 'default nil :height new-height)
40+
(message "default font size is now %d" new-point-height)))
41+
42+
(defun sanityinc/increase-default-font-height ()
43+
(interactive)
44+
(sanityinc/increment-default-font-height 10))
45+
46+
(defun sanityinc/decrease-default-font-height ()
47+
(interactive)
48+
(sanityinc/increment-default-font-height -10))
49+
50+
(global-set-key (kbd "C-M-=") 'sanityinc/increase-default-font-height)
51+
(global-set-key (kbd "C-M--") 'sanityinc/decrease-default-font-height)
52+
53+
54+
55+
(provide 'init-fonts)

lisp/init-golang.el

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(require 'go-autocomplete)
2+
(require 'auto-complete-config)
3+
(require 'go-mode-load)
4+
5+
(add-hook 'before-save-hook 'gofmt-before-save)
6+
7+
(add-hook 'go-mode-hook (lambda ()
8+
(local-set-key (kbd "C-c C-r") 'go-remove-unused-imports)))
9+
10+
(add-hook 'go-mode-hook (lambda ()
11+
(local-set-key (kbd "C-c i") 'go-goto-imports)))
12+
13+
(add-hook 'go-mode-hook (lambda ()
14+
(local-set-key (kbd "M-.") 'godef-jump)))
15+
16+
(provide 'init-golang)

0 commit comments

Comments
 (0)