diff options
| author | jason | 2017-10-26 17:20:53 -0600 |
|---|---|---|
| committer | jason | 2017-10-26 17:20:53 -0600 |
| commit | 363c68317b13154e5e2f424165255de8d42ffc7b (patch) | |
| tree | 0832cc1fe057f722b700569593c12c40d8b725a4 | |
| parent | f4d169d9c90d7cc4f90c5192f69eb5ebe2430d20 (diff) | |
| download | dotemacs-363c68317b13154e5e2f424165255de8d42ffc7b.tar.gz dotemacs-363c68317b13154e5e2f424165255de8d42ffc7b.zip | |
Add Go language support
| -rw-r--r-- | config.org | 24 |
1 files changed, 22 insertions, 2 deletions
| @@ -56,7 +56,8 @@ I primarily use OSes that favor unix line endings, but occasionally I use | |||
| 56 | Windows. This forces the buffers to be utf-8 with unix line endings by default. | 56 | Windows. This forces the buffers to be utf-8 with unix line endings by default. |
| 57 | 57 | ||
| 58 | #+BEGIN_SRC emacs-lisp | 58 | #+BEGIN_SRC emacs-lisp |
| 59 | (setq default-buffer-file-coding-system 'utf-8-unix) | 59 | (setq default-buffer-file-coding-system 'utf-8-unix |
| 60 | tab-width 4) | ||
| 60 | #+END_SRC | 61 | #+END_SRC |
| 61 | 62 | ||
| 62 | Transient-mark-mode makes a region active only when it is highlighted. | 63 | Transient-mark-mode makes a region active only when it is highlighted. |
| @@ -499,7 +500,8 @@ This part is for setting up python mode in the way I prefer. | |||
| 499 | (anaconda-eldoc-mode) | 500 | (anaconda-eldoc-mode) |
| 500 | (company-mode) | 501 | (company-mode) |
| 501 | (auto-fill-mode 1) | 502 | (auto-fill-mode 1) |
| 502 | (setq-local fill-column 79))) | 503 | (setq-local fill-column 80 |
| 504 | indent-tabs-mode nil))) | ||
| 503 | #+END_SRC | 505 | #+END_SRC |
| 504 | ** Rust | 506 | ** Rust |
| 505 | Installation: | 507 | Installation: |
| @@ -527,6 +529,24 @@ Installation: | |||
| 527 | (cargo-minor-mode))) | 529 | (cargo-minor-mode))) |
| 528 | (add-hook 'racer-mode-hook #'company-mode) | 530 | (add-hook 'racer-mode-hook #'company-mode) |
| 529 | #+END_SRC | 531 | #+END_SRC |
| 532 | ** Go | ||
| 533 | #+BEGIN_SRC emacs-lisp | ||
| 534 | (use-package go-mode | ||
| 535 | :ensure t | ||
| 536 | :commands (go-mode)) | ||
| 537 | #+END_SRC | ||
| 538 | |||
| 539 | #+BEGIN_SRC emacs-lisp | ||
| 540 | (defun my-golang-setup () | ||
| 541 | (setq-local indent-tabs-mode t) | ||
| 542 | (setq-local tab-width 4) | ||
| 543 | ;;(go-eldoc-setup) | ||
| 544 | (add-hook 'before-save-hook 'gofmt-before-save) | ||
| 545 | (local-set-key (kbd "M-.") 'godef-jump) | ||
| 546 | (local-set-key (kbd "M-*") 'pop-tag-mark)) | ||
| 547 | |||
| 548 | (add-hook 'go-mode-hook 'my-golang-setup) | ||
| 549 | #+END_SRC | ||
| 530 | * org-mode | 550 | * org-mode |
| 531 | ** Setup | 551 | ** Setup |
| 532 | #+BEGIN_SRC emacs-lisp | 552 | #+BEGIN_SRC emacs-lisp |