Move machine and platform specific code into new files
Move some config out of custom.el for portability
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
custom.el
|
||||||
28
config.el
28
config.el
@@ -9,6 +9,8 @@
|
|||||||
;; (setq user-full-name "John Doe"
|
;; (setq user-full-name "John Doe"
|
||||||
;; user-mail-address "john@doe.com")
|
;; user-mail-address "john@doe.com")
|
||||||
|
|
||||||
|
(add-load-path! (expand-file-name "lisp" doom-user-dir))
|
||||||
|
|
||||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
||||||
;;
|
;;
|
||||||
;; - `doom-font' -- the primary font to use
|
;; - `doom-font' -- the primary font to use
|
||||||
@@ -43,11 +45,9 @@
|
|||||||
;; (setq display-line-numbers-type t)
|
;; (setq display-line-numbers-type t)
|
||||||
(setq display-line-numbers-type 'relative)
|
(setq display-line-numbers-type 'relative)
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
(require (intern (system-name)))
|
||||||
;; change `org-directory'. It must be set before org loads!
|
(require (intern (format "%s" system-type)))
|
||||||
(setq!
|
|
||||||
org-directory
|
|
||||||
"C:/Users/EmmaTurner/OneDrive - Exponential Technology Group, Inc/Documents/Notes/")
|
|
||||||
|
|
||||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||||
@@ -83,6 +83,8 @@
|
|||||||
(after!
|
(after!
|
||||||
org (setq org-hide-emphasis-markers t) (setq org-log-done 'time)
|
org (setq org-hide-emphasis-markers t) (setq org-log-done 'time)
|
||||||
|
|
||||||
|
(push '("cs" . csharp) org-src-lang-modes)
|
||||||
|
|
||||||
;; Collect all .org from my Org directory and subdirs
|
;; Collect all .org from my Org directory and subdirs
|
||||||
(defun load-org-agenda-files-recursively (dir)
|
(defun load-org-agenda-files-recursively (dir)
|
||||||
"Find all directories in DIR."
|
"Find all directories in DIR."
|
||||||
@@ -127,22 +129,6 @@
|
|||||||
:commands (elisp-autofmt-mode elisp-autofmt-buffer)
|
:commands (elisp-autofmt-mode elisp-autofmt-buffer)
|
||||||
:hook (emacs-lisp-mode . elisp-autofmt-mode))
|
:hook (emacs-lisp-mode . elisp-autofmt-mode))
|
||||||
|
|
||||||
;; Windows path
|
|
||||||
(when (eq system-type 'windows-nt)
|
|
||||||
|
|
||||||
;; https://emacs.stackexchange.com/a/29949
|
|
||||||
;; Make sure Unix tools are in front of `exec-path'
|
|
||||||
;; (let ((bash (executable-find "bash")))
|
|
||||||
;; (when bash
|
|
||||||
;; (push (file-name-directory bash) exec-path)))
|
|
||||||
(push "C:/Program Files/Git/usr/bin/" exec-path)
|
|
||||||
|
|
||||||
;; Update PATH from exec-path
|
|
||||||
(let ((path
|
|
||||||
(mapcar
|
|
||||||
'file-truename
|
|
||||||
(append exec-path (split-string (getenv "PATH") path-separator t)))))
|
|
||||||
(setenv "PATH" (mapconcat 'identity (delete-dups path) path-separator))))
|
|
||||||
|
|
||||||
;; Based off https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-headings-and-before-contents
|
;; Based off https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-headings-and-before-contents
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|||||||
17
custom.el
17
custom.el
@@ -1,17 +0,0 @@
|
|||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
(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.
|
|
||||||
'(org-src-lang-modes
|
|
||||||
'(("md" . markdown) ("C" . c) ("C++" . c++) ("asymptote" . asy)
|
|
||||||
("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist)
|
|
||||||
("desktop" . conf-desktop) ("dot" . fundamental) ("elisp" . emacs-lisp)
|
|
||||||
("ocaml" . tuareg) ("screen" . shell-script) ("sqlite" . sql)
|
|
||||||
("toml" . conf-toml) ("shell" . sh) ("ash" . sh) ("sh" . sh) ("bash" . sh)
|
|
||||||
("jsh" . sh) ("bash2" . sh) ("dash" . sh) ("dtksh" . sh) ("ksh" . sh)
|
|
||||||
("es" . sh) ("rc" . sh) ("itcsh" . sh) ("tcsh" . sh) ("jcsh" . sh)
|
|
||||||
("csh" . sh) ("ksh88" . sh) ("oash" . sh) ("pdksh" . sh) ("mksh" . sh)
|
|
||||||
("posix" . sh) ("wksh" . sh) ("wsh" . sh) ("zsh" . sh) ("cs" . csharp)
|
|
||||||
("rpm" . sh))))
|
|
||||||
13
lisp/DESKTOP-TPC8GRE.el
Normal file
13
lisp/DESKTOP-TPC8GRE.el
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
;;; $DOOMDIR/lsip/DESKTOP-TPC8GRE.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Must be set before org loads
|
||||||
|
(setopt
|
||||||
|
org-directory
|
||||||
|
"C:/Users/EmmaTurner/OneDrive - Exponential Technology Group, Inc/Documents/Notes/")
|
||||||
|
|
||||||
|
(provide (intern (system-name)))
|
||||||
|
|
||||||
|
;; For elisp-autofmt
|
||||||
|
;; Local variables:
|
||||||
|
;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")
|
||||||
|
;; end:
|
||||||
27
lisp/windows-nt.el
Normal file
27
lisp/windows-nt.el
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
;;; $DOOMDIR/lisp/windows-nt.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Windows path
|
||||||
|
(when (eq system-type 'windows-nt)
|
||||||
|
|
||||||
|
;; https://emacs.stackexchange.com/a/29949
|
||||||
|
;; Make sure Unix tools are in front of `exec-path`
|
||||||
|
;; (let ((bash (executable-find "bash")))
|
||||||
|
;; (when bash
|
||||||
|
;; (push (file-name-directory bash) exec-path)))
|
||||||
|
;;
|
||||||
|
;; version of bash found is incorrect, so just use the system git path instead
|
||||||
|
(push "C:/Program Files/Git/usr/bin/" exec-path)
|
||||||
|
|
||||||
|
;; Update PATH from exec-path
|
||||||
|
(let ((path
|
||||||
|
(mapcar
|
||||||
|
'file-truename
|
||||||
|
(append exec-path (split-string (getenv "PATH") path-separator t)))))
|
||||||
|
(setenv "PATH" (mapconcat 'identity (delete-dups path) path-separator))))
|
||||||
|
|
||||||
|
(provide (intern (format "%s" system-type)))
|
||||||
|
|
||||||
|
;; For elisp-autofmt
|
||||||
|
;; Local variables:
|
||||||
|
;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")
|
||||||
|
;; end:
|
||||||
Reference in New Issue
Block a user