From a7181571cdcc233401d9338cd633745a79976da7 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 19 Sep 2019 12:42:50 +0200 Subject: [PATCH] Add org layer to Spacemacs (minor cleanup) --- emacs/.spacemacs | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/emacs/.spacemacs b/emacs/.spacemacs index e33a3fc..1e28f74 100644 --- a/emacs/.spacemacs +++ b/emacs/.spacemacs @@ -43,17 +43,14 @@ This function should only modify configuration layer settings." (auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle) - ;; better-defaults emacs-lisp git markdown - html - ;; org + (org :variables org-projectile-file "TODOs.org") (shell :variables shell-default-height 30 shell-default-position 'bottom shell-default-shell 'eshell) - ;; spell-checking syntax-checking (version-control :variables version-control-diff-tool 'diff-hl @@ -71,10 +68,10 @@ This function should only modify configuration layer settings." spacemacs-layouts dap spacemacs-project - (python :variables - python-backend 'anaconda - python-test-runner 'pytest - python-enable-yapf-format-on-save t) + ;; (python :variables + ;; python-backend 'anaconda + ;; python-test-runner 'pytest + ;; python-enable-yapf-format-on-save t) yaml latex pandoc @@ -102,6 +99,9 @@ This function should only modify configuration layer settings." treemacs lsp-treemacs rtags + company-rtags + flycheck-rtags + ivy-rtags ) ;; Defines the behaviour of Spacemacs when installing packages. @@ -491,16 +491,19 @@ before packages are loaded." (smartparens-global-mode t) (show-smartparens-global-mode +1) (add-hook 'after-init-hook 'global-company-mode) - (add-to-list 'auto-mode-alist '("\\.tpp\\'" . c++-mode)) + ; Force Vertical Window spawn (setq split-height-threshold nil) (setq split-width-threshold 0) + ; Function Keybindings (global-set-key [f3] 'other-window) (global-set-key [f4] 'ivy-switch-buffer) - (global-set-key [f5] 'delete-window) + (global-set-key [f5] 'delete-other-windows) (global-set-key [f6] 'counsel-recentf) (windmove-default-keybindings) - (load-file "~/.emacs.d/private/recentf-ext.el"); Add dired in recentf - (setq compilation-finish-function ; Close compilation buffer automatically + ; Add dired in recentf + (load-file "~/.emacs.d/private/recentf-ext.el") + ; Close compilation buffer automatically + (setq compilation-finish-function (lambda (buf str) (if (null (string-match ".*exited abnormally.*" str)) ;;no errors, make the compilation window go away in a few seconds @@ -512,15 +515,24 @@ before packages are loaded." (setq magit-repository-directories '(("/home/coolneng/Documents/Uni/" . 6) ("/home/coolneng/.dotfiles/" . 0))) - (setq lsp-ui-doc-enable nil) ; disable lsp-ui-doc + ; Disable lsp-ui-doc + (setq lsp-ui-doc-enable nil) ; Modeline settings (doom-modeline-mode t) (setq doom-modeline-height 20) (setq doom-modeline-buffer-encoding 'nil) (setq doom-modeline-major-mode-icon 'nil) - ; Select mode for some extensions + ; Default mode for some file extensions + (add-to-list 'auto-mode-alist '("\\.tpp\\'" . c++-mode)) (add-to-list 'auto-mode-alist '("\\.aiml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.latex\\'" . latex-mode)) + ; Add TODO files to the org-agenda + (with-eval-after-load 'org-agenda + (require 'org-projectile) + (mapcar '(lambda (file) + (when (file-exists-p file) + (push file org-agenda-files))) + (org-projectile-todo-files))) ) ;; Do not write anything past this comment. This is where Emacs will @@ -565,7 +577,7 @@ This function is called at the very end of Spacemacs initialization." '(objed-cursor-color "#e45649") '(package-selected-packages (quote - (mmm-mode yapfify yaml-mode xterm-color which-key wgrep web-mode use-package tagedit smex smeargle smartparens slim-mode shell-pop scss-mode sass-mode pyvenv pytest pyenv-mode py-isort pug-mode pip-requirements persp-mode pcre2el pandoc-mode ox-pandoc ht orgit org-plus-contrib multi-term markdown-toc markdown-mode magit-gitflow magit-popup magit macrostep live-py-mode ivy-hydra insert-shebang hydra lv hy-mode dash-functional helm-make haml-mode gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy flycheck-pos-tip pos-tip flycheck flx fish-mode eyebrowse exec-path-from-shell transient git-commit with-editor evil-escape goto-chg eshell-z eshell-prompt-extras esh-help emmet-mode elisp-slime-nav doom-modeline shrink-path disaster diminish diff-hl cython-mode counsel-projectile projectile pkg-info epl counsel swiper ivy company-web web-completion-data company-statistics company-shell company-emacs-eclim eclim company-c-headers company-auctex company-anaconda company cmake-mode clang-format bind-map bind-key auto-yasnippet yasnippet auto-compile packed async anaconda-mode pythonic f s all-the-icons memoize ace-window avy ac-ispell auto-complete popup doom-themes dash))) + (toc-org org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-cliplink org-bullets org-brain gnuplot evil-org yapfify yaml-mode xterm-color which-key wgrep web-mode use-package tagedit smex smeargle smartparens slim-mode shell-pop scss-mode sass-mode pyvenv pytest pyenv-mode py-isort pug-mode pip-requirements persp-mode pcre2el pandoc-mode ox-pandoc ht orgit org-plus-contrib multi-term markdown-toc markdown-mode magit-gitflow magit-popup magit macrostep live-py-mode ivy-hydra insert-shebang hydra lv hy-mode dash-functional helm-make haml-mode gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy flycheck-pos-tip pos-tip flycheck flx fish-mode eyebrowse exec-path-from-shell transient git-commit with-editor evil-escape goto-chg eshell-z eshell-prompt-extras esh-help emmet-mode elisp-slime-nav doom-modeline shrink-path disaster diminish diff-hl cython-mode counsel-projectile projectile pkg-info epl counsel swiper ivy company-web web-completion-data company-statistics company-shell company-emacs-eclim eclim company-c-headers company-auctex company-anaconda company cmake-mode clang-format bind-map bind-key auto-yasnippet yasnippet auto-compile packed async anaconda-mode pythonic f s all-the-icons memoize ace-window avy ac-ispell auto-complete popup doom-themes dash))) '(pdf-view-midnight-colors (quote ("#655370" . "#fbf8ef"))) '(safe-local-variable-values (quote