From faeeda87a3a4f615ba57411175581265eddc1a7c Mon Sep 17 00:00:00 2001 From: benj Date: Tue, 16 Apr 2019 20:34:17 -0700 Subject: flycheck; go; rust; org; treemacs --- settings/setup-flycheck.el | 5 +++++ settings/setup-go-mode.el | 8 ++++++++ settings/setup-org-mode.el | 10 +++------- settings/setup-treemacs.el | 10 ++++++++-- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 settings/setup-go-mode.el (limited to 'settings') diff --git a/settings/setup-flycheck.el b/settings/setup-flycheck.el index 63fca3f..764fe36 100644 --- a/settings/setup-flycheck.el +++ b/settings/setup-flycheck.el @@ -19,6 +19,11 @@ '(custom-set-variables '(flycheck-display-errors-function #'flycheck-pos-tip-error-messages))) +;; hack to get around go tool vet issue +(let ((govet (flycheck-checker-get 'go-vet 'command))) + (when (equal (cadr govet) "tool") + (setf (cdr govet) (cddr govet)))) + (global-set-key (kbd "") 'flyspell-auto-correct-previous-word) (setq flycheck-clangcheck-analyze t) diff --git a/settings/setup-go-mode.el b/settings/setup-go-mode.el new file mode 100644 index 0000000..ff9ac86 --- /dev/null +++ b/settings/setup-go-mode.el @@ -0,0 +1,8 @@ +(add-hook 'go-mode-hook + (lambda () + (add-hook 'before-save-hook 'gofmt-before-save) + (setq tab-width 4) + (setq indent-tabs-mode 1))) + +(provide 'setup-go-mode) +;;; setup-go-mode.el ends here diff --git a/settings/setup-org-mode.el b/settings/setup-org-mode.el index d4b236a..9ad0acc 100644 --- a/settings/setup-org-mode.el +++ b/settings/setup-org-mode.el @@ -1,13 +1,6 @@ ;; Pretty bullets (add-hook 'org-mode-hook (lambda() (org-bullets-mode 1))) -(custom-set-faces - '(org-level-1 ((t (:inherit outline-1 :height 1.0)))) - '(org-level-2 ((t (:inherit outline-2 :height 1.0)))) - '(org-level-3 ((t (:inherit outline-3 :height 1.0)))) - '(org-level-4 ((t (:inherit outline-4 :height 1.0)))) - '(org-level-5 ((t (:inherit outline-5 :height 1.0))))) - (setq org-log-done 'time) (setq org-src-fontify-natively t) (setq org-src-tab-acts-natively t) @@ -30,6 +23,9 @@ (global-set-key (kbd "C-c a") 'org-agenda) +(setq org-agenda-files (list "~/org/todo_work.org" + "~/org/todo_home.org")) + (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) diff --git a/settings/setup-treemacs.el b/settings/setup-treemacs.el index 2a85c50..858e064 100644 --- a/settings/setup-treemacs.el +++ b/settings/setup-treemacs.el @@ -1,12 +1,18 @@ +(require 'dash) (require 'bindKeys) (require 'treemacs) +;; (setq treemacs-dir +;; (car (-filter (lambda (path) +;; (string-match-p "^.+.emacs.d/elpa/treemacs-[0-9]+.[0-9]+$" path)) +;; load-path))) + (bindKeys '("t") - '(("t" . treemacs-select-window) + '(("i" . treemacs) + ("t" . treemacs-select-window) ("b" . treemacs-bookmark) ("f" . treemacs-find-file) ("d" . treemacs-delete-other-windows))) - (provide 'setup-treemacs) ;;; setup-treemacs.el ends here -- cgit v1.2.3