;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; Place your private configuration here! Remember, you do not need to run 'doom
|
|
;; sync' after modifying this file!
|
|
|
|
|
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
|
;; clients, file templates and snippets.
|
|
(setq user-full-name "Levi Olson"
|
|
user-mail-address "olson.levi@gmail.com")
|
|
|
|
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
|
;; are the three important ones:
|
|
;;
|
|
;; + `doom-font'
|
|
;; + `doom-variable-pitch-font'
|
|
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
|
;; presentations or streaming.
|
|
;;
|
|
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
|
;; font string. You generally only need these two:
|
|
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
|
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
|
|
|
(setq doom-font (font-spec :family "PragmataPro Liga" :size 20)
|
|
doom-variable-pitch-font (font-spec :family "PragmataPro Liga" :size 20) ; inherits `doom-font''s :size
|
|
doom-unicode-font (font-spec :family "PragmataPro Liga" :size 12)
|
|
doom-big-font (font-spec :family "PragmataPro Liga" :size 30))
|
|
|
|
(if (eq system-type 'gnu/linux)
|
|
(progn
|
|
(add-to-list 'default-frame-alist '(top . 400))
|
|
(add-to-list 'default-frame-alist '(left . 750))
|
|
(add-to-list 'default-frame-alist '(height . 60))
|
|
(add-to-list 'default-frame-alist '(width . 235))
|
|
))
|
|
|
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
|
;; `load-theme' function. This is the default:
|
|
;; (setq doom-theme 'doom-one)
|
|
(setq doom-theme 'doom-one)
|
|
;; (delq! t custom-theme-load-path)
|
|
|
|
;; If you use `org' and don't want your org files in the default location below,
|
|
;; change `org-directory'. It must be set before org loads!
|
|
(setq org-directory "/mnt/c/Users/Levi/Nextcloud/Org")
|
|
|
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
(setq display-line-numbers-type t)
|
|
|
|
(setq projectile-project-search-path "~/Projects")
|
|
|
|
(setq browse-url-chrome-program "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")
|
|
(setq browse-url-chromium-program "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")
|
|
|
|
|
|
;; Here are some additional functions/macros that could help you configure Doom:
|
|
;;
|
|
;; - `load!' for loading external *.el files relative to this one
|
|
;; - `use-package!' for configuring packages
|
|
;; - `after!' for running code after a package has loaded
|
|
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
|
;; this file. Emacs searches the `load-path' when you load packages with
|
|
;; `require' or `use-package'.
|
|
;; - `map!' for binding new keys
|
|
;;
|
|
;; To get information about any of these functions/macros, move the cursor over
|
|
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
|
;; This will open documentation for it, including demos of how they are used.
|
|
;;
|
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
|
;; they are implemented.
|
|
|
|
(load! "functions.el")
|
|
(use-package! functions)
|
|
|
|
(load! "fancy-banner.el")
|
|
(use-package! fancy-banner)
|
|
|
|
(load! "setup-elfeed.el")
|
|
(use-package! setup-elfeed)
|
|
|
|
(use-package! prodigy
|
|
:config
|
|
(prodigy-define-tag
|
|
:name 'sass
|
|
:ready-message "Sass is watching for changes\\. Press Ctrl\\-C to stop\\.")
|
|
(prodigy-define-tag
|
|
:name 'mc-server
|
|
:ready-message "minecraft is up\\-to\\-date")
|
|
(prodigy-define-tag
|
|
:name 'mc-reload
|
|
:ready-message "Reload complete\\.")
|
|
(prodigy-define-service
|
|
:name "Sass Compiler"
|
|
:command "make"
|
|
:args '("sass")
|
|
:cwd "~/Projects/chrome/chrome-ext-better-network-panel"
|
|
:tags '(sass))
|
|
(prodigy-define-service
|
|
:name "MC Server"
|
|
:command "make"
|
|
:args '("start")
|
|
:cwd "~/minecraft"
|
|
:tags '(mc-server))
|
|
(prodigy-define-service
|
|
:name "MC Reload"
|
|
:command "make"
|
|
:args '("rcon" "COMMAND='reload confirm'")
|
|
:cwd "~/minecraft"
|
|
:tags '(mc-reload))
|
|
)
|
|
|
|
|
|
(use-package! darkroom
|
|
:custom
|
|
(darkroom-margins (cons 40 0))
|
|
(darkroom-text-scale-increase 0)
|
|
(darkroom-fringes-outside-margins nil)
|
|
(darkroom-margin-increment 0.2)
|
|
)
|
|
|
|
|
|
|
|
(use-package! org
|
|
:commands org-capture
|
|
:mode ("\\.org\\'" . org-mode)
|
|
:bind (
|
|
("C-," . org-cycle-agenda-files)
|
|
("C-c C-d" . org-capture)
|
|
:map org-mode-map
|
|
("M-n" . leo/org-narrow-next-tree)
|
|
("M-p" . leo/org-narrow-prev-tree)
|
|
("M-P" . leo/org-present)
|
|
)
|
|
:preface
|
|
(defvar org-html-validation-link)
|
|
(defvar org-html-text-markup-alist)
|
|
(defvar org-capture-templates)
|
|
:init
|
|
(setq org-agenda-files (list (concat org-directory "/todo.org")
|
|
(concat org-directory "/projects.org")
|
|
(concat org-directory "/Recipies.org")
|
|
(concat org-directory "/help.org")
|
|
(concat org-directory "/personal.org")
|
|
(concat org-directory "/archive.org")
|
|
))
|
|
(setq org-agenda-include-diary t)
|
|
(add-to-list 'safe-local-variable-values '(eval leo/deft-insert-boilerplate))
|
|
(setq org-refile-targets '((nil :maxlevel . 3)
|
|
(org-agenda-files :maxlevel . 3))
|
|
org-default-notes-file (concat org-directory "/todo.org"))
|
|
:config
|
|
(setq org-capture-templates
|
|
'(("t" "new task" entry (file+headline (concat org-directory "/todo.org") "Tasks")
|
|
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
|
|
("n" "new note" entry (file+headline org-default-notes-file "Notes")
|
|
"* %?\n%i\n")
|
|
("l" "store link" entry (file+olp org-default-notes-file "Links" "Unfiled")
|
|
"* %a\n%?\n")
|
|
("d" "store link w/drawer" entry (file+olp org-default-notes-file "Links" "Unfiled")
|
|
"* %?\n%l\n:COPIED_TEXT:\n %i\n:END:\n")
|
|
))
|
|
(setq org-structure-template-alist
|
|
'(("r" . "src restclient :results raw")
|
|
("j" . "src js :cmd \"/usr/local/bin/babel-node\" :results output code")
|
|
("e" . "src emacs-lisp :results silent")
|
|
("a" . "export ascii")
|
|
("c" . "center")
|
|
("C" . "comment")
|
|
("E" . "export")
|
|
("h" . "export html")
|
|
("l" . "export latex")
|
|
("q" . "quote")
|
|
("s" . "src")
|
|
("v" . "verse")))
|
|
(defconst checkbox-fontlock-keywords-alist
|
|
(mapcar (lambda (regex-char-pair)
|
|
`(,(car regex-char-pair)
|
|
(0 (prog1 ()
|
|
(compose-region (match-beginning 1)
|
|
(match-end 1)
|
|
,(concat (list ?\C-i)
|
|
(list (decode-char 'ucs (cadr regex-char-pair)))))))))
|
|
'(("\\(\\[ \\]\\)" #XF096);2B1C
|
|
("\\(\\[-\\]\\)" #XF147);29C7;F458
|
|
("\\(\\[X\\]\\)" #XF046);2BBD
|
|
)))
|
|
|
|
(defun add-checkbox-symbol-keywords ()
|
|
"Add checkbox font to font-lock."
|
|
(font-lock-add-keywords nil checkbox-fontlock-keywords-alist))
|
|
|
|
(add-hook 'org-mode-hook 'add-checkbox-symbol-keywords)
|
|
(add-hook 'org-mode-hook '(lambda () (visual-line-mode 0)))
|
|
)
|
|
|
|
(use-package! org-roam
|
|
:hook
|
|
(org-mode . org-roam-mode)
|
|
:config
|
|
(setq org-roam-directory (concat org-directory "/Roam/"))
|
|
;; (setq org-roam-directory "/home/leothelocust/Projects/personal/html-to-org/converted/")
|
|
(setq org-roam-link-title-format "r::%s")
|
|
(org-roam-db-build-cache))
|
|
|
|
(use-package! deft
|
|
:bind
|
|
("C-c n d" . deft)
|
|
:config
|
|
(setq deft-recursive t
|
|
deft-use-filter-string-for-filename t
|
|
deft-default-extension "org"
|
|
;; deft-directory "/home/leothelocust/Projects/personal/html-to-org/converted/"
|
|
deft-directory (concat org-directory "/Roam/")
|
|
deft-recursive-ignore-dir-regexp "\\(?:\\.\\|\\.\\.\\|setup\\)$"))
|
|
|
|
(use-package! org-journal
|
|
:config
|
|
(setq org-journal-date-prefix "#+TITLE: "
|
|
org-journal-time-prefix "* "
|
|
org-journal-date-format "%a, %Y-%m-%d"
|
|
org-journal-file-format "%Y-%m-%d.org"
|
|
))
|
|
|
|
(use-package! org-pandoc-import
|
|
:after org
|
|
:commands (org-pandoc-import-html-as-org org-pandoc-import-html-to-org)
|
|
:config
|
|
(org-pandoc-import-backend html)
|
|
)
|
|
|
|
(use-package! lsp-java
|
|
:config
|
|
(setq lsp-ui-doc-include-signature t
|
|
lsp-ui-doc-enable t
|
|
lsp-ui-sideline-enable t)
|
|
(add-hook 'java-mode-hook #'lsp-deferred)
|
|
(add-hook 'java-mode-hook #'lsp-lens-mode)
|
|
;; (add-hook 'java-mode-hook #'lsp-java-boot-lens-mode)
|
|
(add-hook 'java-mode-hook #'lsp-ui-mode))
|
|
|
|
(use-package! apex-mode
|
|
:mode "\\.cls\\'"
|
|
:bind ("M-q" . #'leo/kill-this-buffer-unless-scratch)
|
|
:config
|
|
(lsp-)
|
|
)
|
|
|
|
(add-hook 'css-mode-hook #'lsp-deferred)
|
|
(add-hook 'js-mode-hook #'lsp-deferred)
|
|
|
|
|
|
(map! :map global-map
|
|
:prefix "C-x"
|
|
"C-l" nil
|
|
(:prefix ("C-l" . "launch")
|
|
"a" #'org-agenda
|
|
"e" #'elfeed
|
|
"g" #'magit-status)
|
|
|
|
)
|
|
|
|
|
|
(map! :map global-map
|
|
"M-t" #'treemacs-select-window
|
|
"M-q" #'leo/kill-this-buffer-unless-scratch
|
|
"M-RET" #'lsp-ui-doc-glance
|
|
|
|
"C-<tab>" #'leo/tidy
|
|
"C-;" #'leo/comment-or-uncomment-region-or-line
|
|
"C-c C-e" #'leo/edit-config
|
|
"C-c d" #'leo/duplicate-thing
|
|
"M-n" #'leo/jump-to-next-symbol
|
|
"M-p" #'leo/jump-to-prev-symbol
|
|
"M-u" #'upcase-dwim
|
|
"M-c" #'capitalize-dwim
|
|
"M-l" #'downcase-dwim
|
|
|
|
"C-c b" #'counsel-switch-buffer
|
|
"C-s" #'swiper
|
|
|
|
"C-}" #'mc/mark-next-like-this
|
|
"C-)" #'mc/unmark-next-like-this
|
|
"C-{" #'mc/mark-previous-like-this
|
|
"C-(" #'mc/unmark-previous-like-this
|
|
"C-@" #'er/expand-region
|
|
"C-#" #'er/contract-region
|
|
|
|
"C-c C-r" #'counsel-recoll
|
|
)
|