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 --- custom.el | 26 ++++++++++++++++++++++++-- init.el | 4 ++++ settings/setup-flycheck.el | 5 +++++ settings/setup-go-mode.el | 8 ++++++++ settings/setup-org-mode.el | 10 +++------- settings/setup-treemacs.el | 10 ++++++++-- 6 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 settings/setup-go-mode.el diff --git a/custom.el b/custom.el index 836346c..e948b38 100644 --- a/custom.el +++ b/custom.el @@ -1,7 +1,29 @@ ;; reserved for all local customization added by emacs ;; do not modify -(custom-set-variables) -(custom-set-faces) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(auto-insert-directory (locate-user-emacs-file "templates/auto-insert")) + '(c-default-style "linux") + '(custom-safe-themes + '("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default)) + '(flycheck-display-errors-function #'flycheck-pos-tip-error-messages) + '(package-selected-packages + '(erlang rust-mode flymake-go go-mode gradle-mode treemacs-projectile treemacs protobuf-mode yaml-mode web-mode visual-regexp-steroids systemd solarized-theme smart-mode-line slime purescript-mode projectile-ripgrep play-routes-mode paredit org-bullets multiple-cursors modern-cpp-font-lock magit lsp-ui ido-vertical-mode highlight-escape-sequences flycheck-pos-tip flycheck-haskell flycheck-clojure flycheck-clangcheck flx-ido ensime ember-mode elm-mode dockerfile-mode cquery company-lsp company-glsl company-c-headers cmake-mode clojure-snippets clojure-mode-extra-font-locking ace-window)) + '(safe-local-variable-values '((projectile-project-run-cmd . "./build/jmessageGtk")))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:height 90 :width normal :family "Source Code Pro Medium")))) + '(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))))) (require 'setup-custom) (provide 'custom) ;;; custom.el ends here diff --git a/init.el b/init.el index 2865ca8..94ccc87 100644 --- a/init.el +++ b/init.el @@ -63,12 +63,14 @@ elm-mode ember-mode ensime + erlang flx-ido flycheck flycheck-clangcheck flycheck-clojure flycheck-haskell flycheck-pos-tip + go-mode haskell-mode highlight-escape-sequences ido-vertical-mode @@ -86,6 +88,7 @@ protobuf-mode purescript-mode org-bullets + rust-mode sbt-mode scala-mode slime @@ -133,6 +136,7 @@ (require 'setup-company-mode) (require 'setup-ember-mode) (require 'setup-flycheck) +(require 'setup-go-mode) (require 'setup-haskell-mode) (require 'setup-ido) (require 'setup-keychain-environment) 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