Initial Commit Woo

This commit is contained in:
DavidCromp
2021-08-21 17:33:51 -04:00
commit c0f5ccf4d2
4 changed files with 285 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
/auto-save-list/
/backups/
/etc/
/straight/
/tutorial/
/var/
tramp

13
custom.el Normal file
View File

@@ -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.
)

214
init.el Normal file
View File

@@ -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-<tab>" . 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" >)
"<LAB" "Insert Lab Template With Headings")
(tempo-define-template "Fig. Caption"
'("" (P "Image: " image t)
(P "Caption: " caption t)
(P "Figure Name: " name t)
"#+CAPTION: " (s caption) > n >
"#+NAME: fig:" (s name) > n >
"#+ATTR_LaTeX: :placement [H]" > n >
"[[" (s image) "]]" > n > p >)
"<fig" "Inserts Figure with Caption")
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-classes
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
(setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "bibtex %b" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
)
; References etc.
(use-package org-ref
:after org
:defer t
:config
(setq reftex-default-bibliography '("~/Documents/Bibliography/references.bib"))
;; see org-ref for use of these variables
(setq org-ref-bibliography-notes "~/Documents/Bibliography/notes.org"
org-ref-default-bibliography '("~/Documents/Bibliography/references.bib")
org-ref-pdf-directory "~/Documents/Bibliography/bibtex-pdfs/")
)
; PDF preview etc.
(use-package pdf-tools)
; better TEX
(use-package auctex
:after org)
; Plotting support
(use-package gnuplot)
;;Org Auto Wrap Config
(add-hook 'org-mode-hook 'auto-fill-mode)
(set-fill-column 100)
;;;; End Org Related
;; ghci-completion company-ghci
;; exec-path-from-shell nix-haskell-mode haskell-mode
;; pyvenv rainbow-mode company-ctags company-jedi
;; company-anaconda anaconda-mode matlab-mode markdown-mode company-irony-c-headers company-irony irony rust-mode company-c-headers cdlatex auctex use-package smog conda gnuplot php-mode web-mode org-ref pdf-tools chess
;;;; END PACKAGES

View File

@@ -0,0 +1,51 @@
(deftheme UniverseHighContrast
"Created 2021-07-23.")
(custom-theme-set-faces
'UniverseHighContrast
'(cursor ((t (:background "SeaGreen1"))))
'(fixed-pitch ((t nil)))
'(variable-pitch ((t nil)))
'(escape-glyph ((t (:foreground "magenta"))))
'(minibuffer-prompt ((t (:foreground "lawn green"))))
'(highlight ((t (:foreground "black" :background "turquoise"))))
'(region ((t (:foreground "black" :background "light blue"))))
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow"))))
'(secondary-selection ((t (:foreground "black" :background "aquamarine"))))
'(trailing-whitespace ((t (:background "slate blue"))))
'(font-lock-builtin-face ((t (:foreground "orchid"))))
'(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face))))
'(font-lock-comment-face ((t (:foreground "#e512ff"))))
'(font-lock-constant-face ((t (:foreground "DeepPink1"))))
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
'(font-lock-function-name-face ((t (:foreground "green"))))
'(font-lock-keyword-face ((t (:foreground "chartreuse"))))
'(font-lock-negation-char-face ((t nil)))
'(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face)))))
'(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))
'(font-lock-regexp-grouping-construct ((t (:inherit (bold)))))
'(font-lock-string-face ((t (:foreground "spring green"))))
'(font-lock-type-face ((t (:foreground "aquamarine"))))
'(font-lock-variable-name-face ((t (:foreground "deep sky blue"))))
'(font-lock-warning-face ((t (:inherit (error)))))
'(button ((t (:inherit (link)))))
'(link ((t (:foreground "green1" :underline t))))
'(link-visited ((t (:foreground "green3" :underline t))))
'(fringe ((t (:background "gray10"))))
'(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line)))))
'(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch)))))
'(mode-line ((t (:box (:line-width -1 :color nil :style released-button) :foreground "white" :background "purple4"))))
'(mode-line-buffer-id ((t (:weight bold))))
'(mode-line-emphasis ((t (:weight bold))))
'(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width 2 :color "grey40" :style released-button))) (t (:inherit (highlight)))))
'(mode-line-inactive ((t (:weight light :box (:line-width -1 :color "grey40" :style nil) :foreground "grey80" :background "grey30" :inherit (mode-line)))))
'(isearch ((t (:foreground "black" :background "pale green"))))
'(isearch-fail ((t (:background "medium sea green"))))
'(lazy-highlight ((t (:background "gray25"))))
'(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray"))))
'(next-error ((t (:inherit (region)))))
'(query-replace ((t (:inherit (isearch)))))
'(default ((t (:foreground "white" :background "black" :height 150))))
)
(provide-theme 'UniverseHighContrast)