diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d8cac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +custom.el \ No newline at end of file diff --git a/config.el b/config.el index ac20aa9..a688aa1 100644 --- a/config.el +++ b/config.el @@ -9,6 +9,8 @@ ;; (setq user-full-name "John Doe" ;; 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-font' -- the primary font to use @@ -43,11 +45,9 @@ ;; (setq display-line-numbers-type t) (setq display-line-numbers-type 'relative) -;; 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 - "C:/Users/EmmaTurner/OneDrive - Exponential Technology Group, Inc/Documents/Notes/") +(require (intern (system-name))) +(require (intern (format "%s" system-type))) + ;; 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. @@ -83,6 +83,8 @@ (after! 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 (defun load-org-agenda-files-recursively (dir) "Find all directories in DIR." @@ -127,22 +129,6 @@ :commands (elisp-autofmt-mode elisp-autofmt-buffer) :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 ;;;###autoload diff --git a/custom.el b/custom.el deleted file mode 100644 index 44d2759..0000000 --- a/custom.el +++ /dev/null @@ -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)))) diff --git a/lisp/DESKTOP-TPC8GRE.el b/lisp/DESKTOP-TPC8GRE.el new file mode 100644 index 0000000..5a73d4d --- /dev/null +++ b/lisp/DESKTOP-TPC8GRE.el @@ -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: diff --git a/lisp/windows-nt.el b/lisp/windows-nt.el new file mode 100644 index 0000000..a9798c3 --- /dev/null +++ b/lisp/windows-nt.el @@ -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: