commit c0f5ccf4d2529c0fca98d7f5570f9735ad442421 Author: DavidCromp Date: Sat Aug 21 17:33:51 2021 -0400 Initial Commit Woo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d499f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/auto-save-list/ +/backups/ +/etc/ +/straight/ +/tutorial/ +/var/ +tramp diff --git a/custom.el b/custom.el new file mode 100644 index 0000000..9d1adc2 --- /dev/null +++ b/custom.el @@ -0,0 +1,13 @@ +(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. + '(custom-safe-themes + '("29addd67feb95ca1179e60d476bb92c1f11835548e2efaec15c9ac6af2a8e6a8" "9b7a425c38c4894e161887c26381c2a6fc1de3c1407158507caaf469d76eb27b" "bce055e1681dd343659957710af77f7a6ad106677d42c61f86ebeedf637c4493" "f62c69472d3f506179d797131c014fe4095d9609dddf14542c50e0388f1e8d6d" "cf143bf23fa8160f87331893cdadc40b876556634621dfa373fcf93c4c97c444" "f459dfd377e9cb98d90e53383dcca7d73396cc0a22b31d39af24fb1cf3548fb5" "fcc14e1a22c99d77f7b1455b0c8a320f8afd0c1f4a9c5c50b45f676eb0c54ba2" "a6bae299481c3c0058e611d2c32ca169fa27203345a880806a5a8554cdd2e588" "feb9556e03558588e29e6659c8e01ea3d2a17a1e7a13e9bf9fc9e59cacba4b72" default))) +(custom-set-faces + ;; custom-set-faces 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. + ) diff --git a/init.el b/init.el new file mode 100644 index 0000000..e8267d8 --- /dev/null +++ b/init.el @@ -0,0 +1,214 @@ +;; -*- lexical-binding: t -*- + +;; Bootstrap straight.el for package management +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) +;; Disable package.el from loading at startup +(setq package-enable-at-startup nil) + +;; Ensure custom writes to specific file +(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) +(load custom-file 'noerror 'nomessage) + +;; Change the location of file backups/locks into the emacs.d/backups/ +(setq backup-directory-alist + `(("." . ,(concat user-emacs-directory "backups")))) + +;;;; VISUAL + +;; Disable Scroll bar, menubar +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +;; Set location of custom theme dir +(setq custom-theme-directory (concat user-emacs-directory "themes")) +(load-theme 'UniverseHighContrast) + +;;;; END VISUAL + +;;;; PACKAGE INSTALL AND CONFIG + +;; Set the packagemanager of use-package +(setq straight-use-package-by-default t) +;; Default to lazy loading +(setq use-package-always-defer t) +;; Ensure use-package.el is installed +(straight-use-package 'use-package) + +;; Ensure shell variables are loaded +(use-package exec-path-from-shell + :init + (when (memq window-system '(mac ns x)) + (exec-path-from-shell-initialize)) + ) + +;; Profiling + +(use-package esup) + +;; Prevents emacs and packages from messily writing to dirs +(use-package no-littering + :demand t) + +;;;; Science Related +(use-package conda) +;;;; End Science Related + +;;;; Web Related +(use-package web-mode + :init + (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) + ) + +(use-package php-mode) +;;;; End Web related + +;;;; C Related +(use-package irony + :init + (add-hook 'c++-mode-hook 'irony-mode) + (add-hook 'c-mode-hook 'irony-mode) + (add-hook 'objc-mode-hook 'irony-mode) + + (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) + ) +;;;; End C Related + +;;;; Company Related +(use-package company :demand t + :bind + (("C-" . company-complete)) + :custom-face + (company-preview ((t (:background "#000000" :foreground "#ffffff" :box (:line-width (2 . 2) :color "gray64" :style released-button))))) + (company-preview-common ((t (:inherit company-preview :foreground "#ff00cf")))) + (company-preview-search ((t (:inherit company-preview :background "black")))) + (company-scrollbar-bg ((t (:background "grey35")))) + (company-scrollbar-fg ((t (:background "#a22390")))) + (company-template-field ((t (:background "grey75" :foreground "black")))) + (company-tooltip ((t (:background "#353535" :foreground "white")))) + (company-tooltip-common ((t (:foreground "magenta")))) + (company-tooltip-mouse ((t (:inherit company-tooltip-selection)))) + (company-tooltip-search ((t (:inherit company-tooltip-selection)))) + (company-tooltip-search-selection ((t (:inherit company-tooltip-selection)))) + (company-tooltip-selection ((t (:background "#4584a2" :foreground "white")))) + ) +(add-hook 'after-init-hook 'global-company-mode) + +; Python +(use-package company-jedi) +; C related +(use-package company-ctags) +(use-package company-c-headers) +(use-package company-irony) +; Haskell +(use-package company-ghci) +;;;; End Company Related + +;;;; Haskell Related +(use-package haskell-mode + :config + (setq haskell-mode-hook '(flyspell-prog-mode interactive-haskell-mode)) + ) + +(use-package ghci-completion) +;;;; End Haskell Related + +;;;; Org Related +;; (use-package org) +(use-package org-contrib) +(use-package org + :config + (require 'org-tempo) + (tempo-define-template + "Lab Template" '("#+TITLE: PHY324: LAB TITLE"n + "#+AUTHOR: ***REMOVED*** | ***REMOVED***"n + "#+DATE: \\today"n + "#+LATEX_HEADER: \\usepackage{natbib}"n + "#+LATEX_HEADER: \\usepackage{float}"n + "#+LATEX_CLASS: labtemplate"n + "#+OPTIONS: toc:nil"n + ""n + "* Abstract:"n + "* Introduction:"n > p + "* Methods:"n + "* Results:"n + "* Discussion:"n + "bibliographystyle:ieeetr"n + "bibliography:~/Documents/Bibliography/references.bib" >) + " n > + "#+NAME: fig:" (s name) > n > + "#+ATTR_LaTeX: :placement [H]" > n > + "[[" (s image) "]]" > n > p >) + "