emacs
26+universal-ctags
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) ;; Org-mode repo
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ;; MELPA
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) ;; GNU ELPA
The one package loader: it’s awesome and it will take care of everything from this point onwards.
(when (not (package-installed-p 'use-package))
(package-refresh-contents) ;; Initialize package index
(package-install 'use-package)) ;; Install use-package
;; use-package: the only thing that is really needed
(eval-when-compile
(require 'use-package)
(setq use-package-always-ensure t)
(setq use-package-verbose t))
(use-package which-key
:demand t
:config
(which-key-mode)
(setq which-key-idle-delay 0.25))
(use-package evil
:demand t
:config (evil-mode 1))
The general leader key is used for setting up prefixed key bindings that
are going to be set globally in every evil
state.
(defconst axltxl/leader-key "SPC")
Through general.el
, a prefixed key binding definer is generated. This
is useful for key binding definitions without having to specify a prefix
every time.
(use-package general
:demand t
:after (evil which-key)
:config
(general-evil-setup t)
(general-create-definer axltxl/general-leader-def :prefix axltxl/leader-key))
This function relies on a key binding generator
axltxl/general-leader-def
and it’s ultimately used to
create prefixed key bindings all throughout the configuration.
(defun axltxl/define-key (key ecmd &rest keydefs)
(axltxl/general-leader-def
:keymaps 'override
:states '(normal visual motion emacs)
key ecmd)
(if keydefs (apply 'axltxl/define-key keydefs)))
All prefixed key combinations are relabeled on which-key via general.el
(general-define-key
:prefix axltxl/leader-key
:keymaps 'override
:states '(normal visual motion emacs)
"p" '(nil :which-key "project")
"pc" '(nil :which-key "ctags")
"f" '(nil :which-key "file")
"e" '(nil :which-key "emacs")
"ep" '(nil :which-key "packages")
"b" '(nil :which-key "buffer")
"h" '(nil :which-key "help")
"hd" '(nil :which-key "describe")
"w" '(nil :which-key "window")
"g" '(nil :which-key "git")
"j" '(nil :which-key "jump")
"t" '(nil :which-key "toggle")
"o" '(nil :which-key "org")
"oa" '(nil :which-key "org-agenda")
"oc" '(nil :which-key "org-capture"))
Major mode prefixed key bindings are meant to be bound only on buffers
where these major modes are applied. The bindings are usually by general
as soon as a package has been loaded by use-package
.
(defconst axltxl/major-mode-leader-key ",")
(defconst axltxl/emacs-init-file (concat user-emacs-directory "init.el"))
(defconst axltxl/emacs-org-file (concat user-emacs-directory "README.org"))
(defconst axltxl/emacs-org-rendered-file (concat user-emacs-directory "README.el"))
(defun axltxl/config-restart ()
(interactive)
(load-file axltxl/emacs-init-file))
(axltxl/define-key "er" 'axltxl/config-restart)
(defun axltxl/init-edit ()
(interactive)
(find-file axltxl/emacs-init-file))
(axltxl/define-key "ed" 'axltxl/init-edit)
(use-package bug-hunter :demand t)
(defun axltxl/init-debug ()
(interactive)
(bug-hunter-file axltxl/emacs-init-file)
(bug-hunter-file axltxl/emacs-org-rendered-file))
(axltxl/define-key "ex" 'axltxl/init-debug)
(defun axltxl/org-edit ()
(interactive)
(find-file axltxl/emacs-org-file))
(axltxl/define-key "eo" 'axltxl/org-edit)
Private configuration snippets can be loaded from a directory specified
at axltxl/emacs-private-dir
There, things like trying new packages or
secrets and/or sensitive information can be thrown without risk of
any “undesired disclosure”.
(defconst axltxl/emacs-private-dir (concat user-emacs-directory "private.d"))
(if (file-directory-p axltxl/emacs-private-dir)
(apply 'load-file (directory-files axltxl/emacs-private-dir t "\.el$")))
auto-package-udpate
makes sure packages are updated as soon as there are new
versions of them.
(use-package auto-package-update
:config
(setq auto-package-update-interval 7)
(setq auto-package-update-prompt-before-update t)
(setq auto-package-update-delete-old-versions t)
(auto-package-update-maybe))
(axltxl/define-key "epu" 'auto-package-update-now)
The one binding where everything begins
(axltxl/define-key "SPC" 'execute-extended-command)
(use-package company
:config
;; Let company act immediately
(setq company-idle-delay 0)
;; company-mode should be ready at all times
(add-hook 'after-init-hook 'global-company-mode)
;; Key bindings for this one
:general
( :states '(insert)
"TAB" 'company-complete
"M-k" 'company-select-previous
"M-j" 'company-select-next))
flyspell-mode
is used for spell checking on the fly while typing
(add-hook 'prog-mode-hook (lambda () (flyspell-prog-mode 1)))
(add-hook 'org-mode-hook (lambda () (flyspell-mode 1)))
(add-hook 'text-mode-hook (lambda () (flyspell-mode 1)))
Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs, intended as replacement for the older Flymake extension which is part of GNU Emacs.
(use-package flycheck
:config (global-flycheck-mode))
(use-package editorconfig :config (editorconfig-mode 1))
(fset 'yes-or-no-p 'y-or-n-p)
Automatically update a buffer if a file changes on disk
(global-auto-revert-mode 1)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
This makes sure that brace structures ()
, []
, {}
, etc.
are closed as soon as the opening character is typed.
(use-package autopair :config (autopair-global-mode))
(blink-cursor-mode 0)
No nothing, me no likey
(setq-default truncate-lines 1)
(show-paren-mode 1)
unimpaired.vim
in emacs! :)
(use-package evil-unimpaired
:after general
:load-path "local"
:config
(evil-unimpaired-mode))
vim-surround
in emacs :)
(use-package evil-surround
:after general
:config
(global-evil-surround-mode 1))
(use-package highlight-indent-guides
:config
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
(setq highlight-indent-guides-method 'fill))
All backups go to a single dedicated directory
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
(use-package real-auto-save
:config
(add-hook 'prog-mode-hook 'real-auto-save-mode)
(add-hook 'org-mode-hook 'real-auto-save-mode)
(setq real-auto-save-interval 10))
Comment all the things a la nerd commenter
(use-package evil-nerd-commenter :after general)
<axltxl/leader-key> ;;
does the magic
(axltxl/define-key ";" 'evilnc-comment-operator)
Increase/decrease font size
(use-package general
:config
(general-define-key
:maps 'override
:states '(normal visual insert motion)
"C-}" 'text-scale-increase
"C-{" 'text-scale-decrease))
(setq-default indicate-empty-lines t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq-default require-final-newline t)
Yep, that’s right!. No mouse means no mouse at all …
(use-package disable-mouse
:after (evil general)
:config
(global-disable-mouse-mode)
(mapc #'disable-mouse-in-keymap
(list evil-motion-state-map
evil-normal-state-map
evil-visual-state-map
evil-insert-state-map)))
(setq custom-file (concat user-emacs-directory "custom.el"))
(load custom-file 'noerror)
(setq axltxl/ctags-options-file (concat user-emacs-directory "ctags.conf"))
(use-package counsel-etags :after counsel
:ensure t
:bind (("C-]" . counsel-etags-find-tag-at-point))
:init
;; Don't ask before rereading the TAGS files if they have changed
(setq tags-revert-without-query t)
;; Don't warn when TAGS files are large
(setq large-file-warning-threshold nil)
;; Autoupdate tags file
(add-hook 'prog-mode-hook
(lambda ()
(add-hook 'after-save-hook
'counsel-etags-virtual-update-tags 'append 'local)))
:config
(setq counsel-etags-update-interval 60)
(push "build" counsel-etags-ignore-directories)
;;Set custom configuration file
(setq counsel-etags-ctags-options-file axltxl/ctags-options-file))
(axltxl/define-key "pcf" 'counsel-etags-find-tag)
(axltxl/define-key "pcl" 'counsel-etags-list-tag)
(axltxl/define-key "pcu" 'counsel-etags-update-tags-force)
(axltxl/define-key "pcs" 'counsel-etags-scan-code)
(axltxl/define-key
"hdf" 'describe-function
"hdb" 'general-describe-keybindings
"hdm" 'describe-mode)
(use-package winner :ensure nil :config (winner-mode))
(axltxl/define-key "wv" 'split-window-right)
(axltxl/define-key "ws" 'split-window-below)
(axltxl/define-key "wd" 'delete-window)
(axltxl/define-key "w=" 'balance-windows)
(axltxl/define-key "wm" 'maximize-window)
(axltxl/define-key "wu" 'winner-undo)
(axltxl/define-key "wr" 'winner-redo)
(axltxl/define-key "wk" 'windmove-up)
(axltxl/define-key "wj" 'windmove-down)
(axltxl/define-key "wh" 'windmove-left)
(axltxl/define-key "wl" 'windmove-right)
ace-window
is pretty useful for quickly switching windows,
even across frames!, among other cool things.
(use-package ace-window
:init
;; trigger ace-window always
(setq aw-dispatch-always t)
;; aw-keys are 0-9 by default, which is reasonable,
;; but in the setup above, the keys are on the home row.
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
ace-window
mode
(axltxl/define-key "ww" 'ace-window)
(axltxl/define-key "wf" 'make-frame)
(axltxl/define-key "wo" 'other-frame)
(axltxl/define-key "ff" 'find-file)
(axltxl/define-key "fs" 'save-buffer)
(axltxl/define-key "bp" 'previous-buffer)
(axltxl/define-key "bn" 'next-buffer)
(axltxl/define-key "bb" 'counsel-switch-buffer)
(axltxl/define-key "bm" (lambda () (interactive)(switch-to-buffer "*Messages*")))
(axltxl/define-key "bs" (lambda () (interactive)(switch-to-buffer "*scratch*")))
(axltxl/define-key "bd" 'evil-delete-buffer)
(axltxl/define-key "bN" 'evil-buffer-new)
(axltxl/define-key "br" 'revert-buffer)
Toggle whitespace in current buffer
(axltxl/define-key "tw" 'whitespace-mode)
Toggle display line numbers
(axltxl/define-key "tl" 'display-line-numbers-mode)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(custom-set-variables
'(initial-frame-alist (quote ((fullscreen . maximized)))))
(setq ring-bell-function 'ignore)
See: https://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html
(add-to-list 'default-frame-alist
'(font . "Terminus-11"))
(if (not (boundp 'axltxl/theme-light))
(defconst axltxl/theme-light 'doom-solarized-light))
(if (not (boundp 'axltxl/theme-dark))
(defconst axltxl/theme-dark 'doom-dracula))
(defconst axltxl/theme-default axltxl/theme-dark)
This will keep the current set theme from changing
across configuration reloads via axltxl/config-restart
command
(if (not (boundp 'axltxl/theme-current))
(setq axltxl/theme-current axltxl/theme-default))
(defun axltxl/toggle-theme ()
(interactive)
(if (eq axltxl/theme-current axltxl/theme-dark)
(setq axltxl/theme-current axltxl/theme-light)
(setq axltxl/theme-current axltxl/theme-dark))
(load-theme axltxl/theme-current t))
;; Key binding for axltxl/toggle-theme
(axltxl/define-key "tt" 'axltxl/toggle-theme)
What can I say?. They look so nice! :).
(use-package doom-themes :after (org neotree)
:demand t
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
;; Load current theme
(load-theme axltxl/theme-current t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
Set the real modeline now :)
(use-package doom-modeline
:demand t
:after doom-themes
:config
;; How tall the mode-line should be. It's only respected in GUI.
;; If the actual char height is larger, it respects the actual height.
(setq doom-modeline-height 32)
;; How wide the mode-line bar should be. It's only respected in GUI.
(setq doom-modeline-bar-width 3)
;; Determines the style used by `doom-modeline-buffer-file-name'.
;;
;; Given ~/Projects/FOSS/emacs/lisp/comint.el
;; truncate-upto-project => ~/P/F/emacs/lisp/comint.el
;; truncate-from-project => ~/Projects/FOSS/emacs/l/comint.el
;; truncate-with-project => emacs/l/comint.el
;; truncate-except-project => ~/P/F/emacs/l/comint.el
;; truncate-upto-root => ~/P/F/e/lisp/comint.el
;; truncate-all => ~/P/F/e/l/comint.el
;; relative-from-project => emacs/lisp/comint.el
;; relative-to-project => lisp/comint.el
;; file-name => comint.el
;; buffer-name => comint.el<2> (uniquify buffer name)
;;
;; If you are expereicing the laggy issue, especially while editing remote files
;; with tramp, please try `file-name' style.
;; Please refer to https://github.com/bbatsov/projectile/issues/657.
(setq doom-modeline-buffer-file-name-style 'truncate-except-project)
;; Whether display icons in mode-line or not.
(setq doom-modeline-icon t)
;; Whether display the icon for major mode. It respects `doom-modeline-icon'.
(setq doom-modeline-major-mode-icon t)
;; Whether display color icons for `major-mode'. It respects
;; `doom-modeline-icon' and `all-the-icons-color-icons'.
(setq doom-modeline-major-mode-color-icon t)
;; Whether display icons for buffer states. It respects `doom-modeline-icon'.
(setq doom-modeline-buffer-state-icon t)
;; Whether display buffer modification icon. It respects `doom-modeline-icon'
;; and `doom-modeline-buffer-state-icon'.
(setq doom-modeline-buffer-modification-icon t)
;; Whether display minor modes in mode-line or not.
(setq doom-modeline-minor-modes nil)
;; If non-nil, a word count will be added to the selection-info modeline segment.
(setq doom-modeline-enable-word-count nil)
;; Whether display buffer encoding.
(setq doom-modeline-buffer-encoding t)
;; Whether display indentation information.
(setq doom-modeline-indent-info nil)
;; If non-nil, only display one number for checker information if applicable.
(setq doom-modeline-checker-simple-format nil)
;; The maximum displayed length of the branch name of version control.
(setq doom-modeline-vcs-max-length 12)
;; Whether display perspective name or not. Non-nil to display in mode-line.
(setq doom-modeline-persp-name t)
;; Whether display `lsp' state or not. Non-nil to display in mode-line.
(setq doom-modeline-lsp t)
;; Whether display github notifications or not. Requires `ghub` package.
(setq doom-modeline-github nil)
;; The interval of checking github.
(setq doom-modeline-github-interval (* 30 60))
;; Whether display environment version or not
(setq doom-modeline-env-version t)
;; Or for individual languages
(setq doom-modeline-env-enable-python t)
(setq doom-modeline-env-enable-ruby t)
(setq doom-modeline-env-enable-perl t)
(setq doom-modeline-env-enable-go t)
(setq doom-modeline-env-enable-elixir t)
(setq doom-modeline-env-enable-rust t)
;; Change the executables to use for the language version string
(setq doom-modeline-env-python-executable "python")
(setq doom-modeline-env-ruby-executable "ruby")
(setq doom-modeline-env-perl-executable "perl")
(setq doom-modeline-env-go-executable "go")
(setq doom-modeline-env-elixir-executable "iex")
(setq doom-modeline-env-rust-executable "rustc")
;; Whether display mu4e notifications or not. Requires `mu4e-alert' package.
(setq doom-modeline-mu4e nil)
;; Whether display irc notifications or not. Requires `circe' package.
(setq doom-modeline-irc nil)
;; Function to stylize the irc buffer names.
(setq doom-modeline-irc-stylize 'identity)
;; Let the awesomeness begin :)
(doom-modeline-mode 1))
This is necessary for the functions that come afterwards.
(random t) ; seed random number
(setq axltxl/emacs-splash-dir (concat user-emacs-directory "splash"))
(setq axltxl/splash-image
(format "%s/splash%s.png" axltxl/emacs-splash-dir
(random (- (length (directory-files axltxl/emacs-splash-dir nil "\.png$")) 1))))
(setq axltxl/emacs-dashboard-titles
[ "You rock today!"
"\"Royale with cheese\" - Pulp Fiction, 1994."
"\"Only dead fish go with the flow\" - Andy Hunt. Pragmatic Thinking and Learning."])
(use-package dashboard
:after general ; this one has key bindings
:demand t
:config
;; Set the title
(setq dashboard-banner-logo-title
(aref axltxl/emacs-dashboard-titles
(random (- (length axltxl/emacs-dashboard-titles) 1))))
;; Set the banner images
(setq dashboard-startup-banner axltxl/splash-image)
;; Content is not centered by default.
(setq dashboard-center-content t)
;; Set up agenda items from org-mode
(add-to-list 'dashboard-items '(agenda) t)
(setq show-week-agenda-p t)
;; Widgets
(setq dashboard-set-file-icons t)
(setq dashboard-items '((recents . 5)
(projects . 5)
(agenda . 5)))
;; show info about the packages loaded and the init time
(setq dashboard-set-init-info t)
;; No footer
(setq dashboard-set-footer nil)
;; Start it up
(dashboard-setup-startup-hook))
(use-package wgrep)
(use-package counsel
:demand t
:after (general wgrep projectile)
;; Configuration
:config
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) ")
(setq ivy-height 10)
;; integration with projectile
(setq projectile-completion-system 'ivy)
;; start it up
(ivy-mode 1)
;; Key bindings for this layer
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
:general
;; Replace standard vi-style search with swiper
(:states '(normal motion emacs)
"/" 'swiper)
;; swiper minor modes key bindings
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(:keymaps 'swiper-map
:prefix axltxl/major-mode-leader-key
"r" 'swiper-query-replace)
;; Navigation within ivy-based buffers
;; (like counsel for example)
(:keymaps 'ivy-mode-map
"M-j" 'ivy-next-line
"M-k" 'ivy-previous-line
"M-l" 'ivy-alt-done
"M-h" 'ivy-backward-delete-char))
(axltxl/define-key "p/" 'counsel-git-grep)
(use-package neotree :after (general projectile)
:demand t
;; Key bindings for this one
:general
( :states '(motion normal)
:keymaps 'neotree-mode-map
"ov" 'neotree-enter-vertical-split
"os" 'neotree-enter-horizontal-split
"RET" 'neotree-enter
"c" 'neotree-create-node
"r" 'neotree-rename-node
"d" 'neotree-delete-node
"y" 'neotree-copy-node
"h" 'neotree-select-up-node
"gr" 'neotree-refresh
"C" 'neotree-change-root
"H" 'neotree-hidden-file-toggle
"q" 'neotree-hide
"l" 'neotree-enter)
;; Configuration
:config
;; all-the-icons support
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)))
;; Always show hidden files
(setq neo-show-hidden-files t)
;; Hide cursor in NeoTree buffer and turn on line higlight
(setq neo-hide-cursor t)
;; Update neotree buffer automatically
(setq neo-autorefresh t)
;; No modeline for this one
(setq neo-mode-line-type 'none)
(axltxl/define-key "TAB" 'neotree-toggle)
Similar to find-file-in-project
, NeoTree can be opened (toggled) at projectile
project root as follows:
(defun neotree/project-dir ()
"Open NeoTree using the git root."
(interactive)
(let ((project-dir (projectile-project-root))
(file-name (buffer-file-name)))
(neotree-toggle)
(if project-dir
(if (neo-global--window-exists-p)
(progn
(neotree-dir project-dir)
(neotree-find file-name)))
(message "Could not find git project root."))))
(axltxl/define-key "pt" 'neotree/project-dir)
(defconst axltxl/org-home "~/org/")
(defconst axltxl/org-journal-dir (concat axltxl/org-home "journal/"))
;; org-capture templates directory
(defconst org-tpl-dir (concat axltxl/org-home "templates/"))
(defconst org-tpl-private-dir (concat org-tpl-dir "private/"))
;; org-capture TODO templates locations
(defconst org-tpl-tasks-dir (concat org-tpl-dir "tasks/"))
(defconst org-tpl-tasks-private-dir (concat org-tpl-private-dir "tasks/"))
;; org-capture templates locations for org-journal
(defconst org-tpl-journal-dir (concat org-tpl-dir "journal/"))
(defconst org-tpl-journal-private-dir (concat org-tpl-private-dir "journal/"))
(use-package org
:pin org
:after general
:demand t
;; org-mode prefixed key bindings
:general
(:states 'normal
:keymaps 'org-mode-map
:prefix axltxl/major-mode-leader-key
"SPC" 'org-toggle-checkbox
"il" 'org-insert-link
"t" 'org-todo)
;; org-mode non-prefixed key bindings
(:states '(normal insert)
:keymaps 'org-mode-map
"C->" 'org-metaright
"C-<" 'org-metaleft)
;; Configuration
:config
;; TODO lists keywords
(setq org-todo-keywords
'((sequence "TODO" "|" "DONE" "CANCELLED"))))
UTF-8 fancy bullets for org-mode
(use-package org-bullets
:after org
:init
;; Custom bullets
(setq org-bullets-bullet-list '("■" "◆" "▲" "▶"))
:config
;; Turn on org-mode
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-journal
:after org
:init
(setq
org-journal-dir axltxl/org-journal-dir
org-journal-file-format "%Y%m%d.org"
org-journal-date-prefix "#+TITLE: "
org-journal-date-format "%Y-%m-%d"
org-journal-time-prefix "* "
org-journal-time-format "%H:%M:%S => "
))
(axltxl/define-key "oja" 'org-journal-new-entry)
(use-package org-agenda
:after (org general)
:ensure nil ; This is vanilla org-mode
;; Prefixed Key Bindings
:general (
:states '(normal motion emacs)
:keymaps 'org-agenda-mode-map
"j" 'org-agenda-next-line
"k" 'org-agenda-previous-line
"s" 'org-agenda-schedule
"c" 'org-agenda-capture
"t" 'org-agenda-todo)
:config
;; Initial agenda files
(setq org-agenda-files `(,(concat axltxl/org-home "tasks.org"))))
(axltxl/define-key "oaa" 'org-agenda)
(axltxl/define-key "oat" 'org-todo-list)
This function will allow org-capture
to add a new journal entry
(with-eval-after-load 'org-journal
(defun axltxl/org-journal-find-location ()
;; Open today's journal, but specify a non-nil prefix argument in order to
;; inhibit inserting the heading; org-capture will insert the heading.
(org-journal-new-entry t)
;; Position point on the journal's top-level heading so that org-capture
;; will add the new entry as a child entry.
(goto-char (point-min))))
(use-package org-capture
:after org-journal
:ensure nil
:config
;; Automatically align all tags before finalizing capture
;; https://www.reddit.com/r/emacs/comments/93990v/automatically_add_tag_to_capture_in_org_mode/
(add-hook 'org-capture-before-finalize-hook #'org-align-all-tags)
;; org-capture templates
;; https://orgmode.org/manual/Capture-templates.html#Capture-templates
(setq org-capture-templates
;; Journal entries
`(
("j" "journal/entry" entry
(function axltxl/org-journal-find-location)
(file ,(concat org-tpl-journal-dir "generic.org")))
("a" "journal/action" entry
(function axltxl/org-journal-find-location)
(file ,(concat org-tpl-journal-dir "actions/generic.org")))
("e" "journal/event" entry
(function axltxl/org-journal-find-location)
(file ,(concat org-tpl-journal-dir "events/generic.org")))
("t" "task" entry
(file ,(concat axltxl/org-home "tasks.org"))
(file ,(concat org-tpl-tasks-dir "generic.org")))
("G" "journal/entry/github" entry
(function axltxl/org-journal-find-location)
(file ,(concat org-tpl-journal-private-dir "events/github.org")))
("A" "task/action" entry
(file ,(concat axltxl/org-home "tasks.org"))
(file ,(concat org-tpl-tasks-dir "actions/generic.org")))
("g" "task/action/github" entry
(file ,(concat axltxl/org-home "tasks.org"))
(file ,(concat org-tpl-journal-private-dir "events/github.org"))))))
(axltxl/define-key "oc" 'org-capture)
(use-package org-projectile
:after (org org-agenda projectile)
:config
;; All project TODOs in one single file
(setq org-projectile-projects-file (concat axltxl/org-home "projects.org"))
;; org-projectile + org-agenda
(setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
;; org-projectile + org-capture
(push (org-projectile-project-todo-entry) org-capture-templates))
;; go to TODOs file for project
(defun org-projectile/goto-todos ()
(interactive)
(org-projectile-goto-location-for-project (projectile-project-name)))
(axltxl/define-key "po" 'org-projectile/goto-todos)
(use-package projectile
:demand t
:config (projectile-mode +1))
(axltxl/define-key "pp" 'projectile-switch-project)
(axltxl/define-key "pf" 'projectile-find-file)
(use-package git-gutter :config (global-git-gutter-mode t))
(use-package magit :after general)
Gotta be honest. evil-magit
does a wonderful job for that
(use-package evil-magit :after magit)
(axltxl/define-key "gs" 'magit-status)
(use-package yaml-mode
:config
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode))
;; Unlike python-mode, this mode follows the Emacs convention of not
;; binding the ENTER key to `newline-and-indent'. To get this
;; behavior, add the key definition to `yaml-mode-hook':
(add-hook 'yaml-mode-hook
'(lambda ()
(define-key yaml-mode-map "\C-m" 'newline-and-indent))))
(use-package json-mode)
(use-package terraform-mode
:config
; Format the current buffer with terraform-format-buffer. To always
; format terraform buffers when saving, use:
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode))
… and we add company
autocompletion into the mix
(use-package company-terraform
:after (company terraform-mode)
:config
(company-terraform-init))
(use-package haxe-mode)