(Emacs)~move elips files into elisp/ folder
These files were cluttering the main directory, I'd rather just have my config files here.
This commit is contained in:
66
Emacs/.config/emacs/elisp/ada-mode.el
Normal file
66
Emacs/.config/emacs/elisp/ada-mode.el
Normal file
@@ -0,0 +1,66 @@
|
||||
;;; ada-mode.el --- My custom ada-mode that colourises buffers -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2021 Aryadev Chavali
|
||||
|
||||
;; Author: Aryadev Chavali <aryadev@aryadevchavali.com>
|
||||
;; Keywords: faces, languages
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This provides colourising for ada files. Is not compatible with
|
||||
;; standard ada-mode due to name conflicts. Personally I'd rather
|
||||
;; have a mode for colourising a buffer which is what this is supposed
|
||||
;; to be.
|
||||
|
||||
;; I feel ada-mode™ (the official one) tries to do too many things at
|
||||
;; once, so I want something that does the basics. Also want to take
|
||||
;; this opportunity to make a new mode and see what facilities Emacs
|
||||
;; provides for it.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'generic-x)
|
||||
|
||||
(define-generic-mode ada-mode
|
||||
'("--") ; Comments
|
||||
'("abort" "else" "new" "return"
|
||||
"abs" "elsif" "not" "reverse"
|
||||
"abstract" "end" "null"
|
||||
"accept" "entry" "select"
|
||||
"access" "exception" "of" "separate"
|
||||
"aliased" "exit" "or" "subtype"
|
||||
"all" "others" "synchronized"
|
||||
"and" "for" "out"
|
||||
"array" "function" "overriding" "tagged"
|
||||
"at" "task"
|
||||
"generic" "package" "terminate"
|
||||
"begin" "goto" "pragma" "then"
|
||||
"body" "private" "type"
|
||||
"if" "procedure"
|
||||
"case" "in" "protected" "until"
|
||||
"constant" "interface" "use"
|
||||
"is" "raise"
|
||||
"declare" "range" "when"
|
||||
"delay" "limited" "record" "while"
|
||||
"delta" "loop" "rem" "with"
|
||||
"digits" "renames"
|
||||
"do" "mod" "requeue" "xor") ; Keywords
|
||||
nil
|
||||
'("\\.ad\\(b\\|s\\)")
|
||||
nil)
|
||||
|
||||
(provide 'ada-mode)
|
||||
;;; ada-mode.el ends here
|
||||
66
Emacs/.config/emacs/elisp/haskell-multiedit.el
Normal file
66
Emacs/.config/emacs/elisp/haskell-multiedit.el
Normal file
@@ -0,0 +1,66 @@
|
||||
;;; haskell-multiedit.el --- Minor mode to edit and evaluate multi-line scripts of Haskell without making a file -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2021 Aryadev Chavali
|
||||
|
||||
;; Author: Aryadev Chavali <aryadev@aryadevchavali.com>
|
||||
;; Keywords:
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; To be used in a haskell-interactive-mode buffer. It'll generate a
|
||||
;; new buffer with haskell-mode and this minor mode activated. Once
|
||||
;; finished with the code, using another keybind it'll close this
|
||||
;; buffer and paste the code into haskell-interactive-mode, evaluating
|
||||
;; it all line by line with indenting and multi-line guards.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defvar haskell-multiedit-mode-map
|
||||
(make-sparse-keymap))
|
||||
|
||||
(define-minor-mode haskell-multiedit-mode
|
||||
"Minor mode for haskell buffers generated by haskell-interactive-mode.
|
||||
Provides bindings to retrieve content back into the REPL with
|
||||
full multi-edit commands"
|
||||
nil
|
||||
""
|
||||
haskell-multiedit-mode-map)
|
||||
|
||||
(with-eval-after-load "haskell"
|
||||
(defun haskell-multiedit ()
|
||||
(interactive)
|
||||
(haskell-interactive-mode-return)
|
||||
(switch-to-buffer "*haskell-temp*")
|
||||
(haskell-mode)
|
||||
(haskell-multiedit-mode))
|
||||
|
||||
(defun haskell-multiedit-evaluate-at-repl ()
|
||||
(interactive)
|
||||
(let* ((contents (buffer-string))
|
||||
(lines (split-string contents "\n")))
|
||||
(switch-to-buffer (haskell-session-interactive-buffer (haskell-session)))
|
||||
(insert ":{")
|
||||
(haskell-interactive-mode-return)
|
||||
(mapc #'(lambda (line) (insert line) (haskell-interactive-mode-return)) lines)
|
||||
(insert ":}")
|
||||
(haskell-interactive-mode-return)))
|
||||
|
||||
(define-key haskell-interactive-mode-map (kbd "C-c '") #'haskell-multiedit)
|
||||
(define-key haskell-multiedit-mode-map (kbd "C-c '") #'haskell-multiedit-evaluate-at-repl)
|
||||
)
|
||||
|
||||
(provide 'haskell-multiedit)
|
||||
;;; haskell-interactive-multiedit.el ends here
|
||||
61
Emacs/.config/emacs/elisp/monokai-theme.el
Normal file
61
Emacs/.config/emacs/elisp/monokai-theme.el
Normal file
@@ -0,0 +1,61 @@
|
||||
(deftheme monokai
|
||||
"Created 2021-03-10.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'monokai
|
||||
'(cursor ((t (:background "white"))))
|
||||
'(fixed-pitch ((t (:family "Monospace"))))
|
||||
'(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif"))))
|
||||
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
|
||||
'(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
|
||||
'(minibuffer-prompt ((t (:foreground "#fd971f"))))
|
||||
'(highlight ((t (:background "firebrick4" :foreground "white"))))
|
||||
'(region ((t (:extend t :background "#4e4e4e"))))
|
||||
'(shadow ((t (:foreground "#555556"))))
|
||||
'(secondary-selection ((t (:extend t :background "#525254"))))
|
||||
'(trailing-whitespace ((t (:background "#e74c3c"))))
|
||||
'(font-lock-builtin-face ((t (:foreground "#fd971f"))))
|
||||
'(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face))))
|
||||
'(font-lock-comment-face ((t (:foreground "#555556" :slant italic))))
|
||||
'(font-lock-constant-face ((t (:inherit font-lock-variable-name-face))))
|
||||
'(font-lock-doc-face ((t (:foreground "#7f7f80" :inherit (font-lock-comment-face)))))
|
||||
'(font-lock-function-name-face ((t (:foreground "#b6e63e"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "#fb2874" :family "Source Code Variable"))))
|
||||
'(font-lock-negation-char-face ((t (:foreground "#9c91e4" :inherit (bold)))))
|
||||
'(font-lock-preprocessor-face ((t (:foreground "#9c91e4" :inherit (bold)))))
|
||||
'(font-lock-regexp-grouping-backslash ((t (:foreground "#9c91e4" :inherit (bold)))))
|
||||
'(font-lock-regexp-grouping-construct ((t (:foreground "#9c91e4" :inherit (bold)))))
|
||||
'(font-lock-string-face ((t (:foreground "yellow green"))))
|
||||
'(font-lock-type-face ((t (:foreground "#66d9ef"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "#fd971f"))))
|
||||
'(font-lock-warning-face ((t (:inherit (warning)))))
|
||||
'(button ((t (:inherit (link)))))
|
||||
'(link ((t (:weight bold :underline (:color foreground-color :style line) :foreground "#fd971f"))))
|
||||
'(link-visited ((t (:foreground "violet" :inherit (link)))))
|
||||
'(fringe ((t (:foreground "#4e4e4e" :inherit (default)))))
|
||||
'(header-line ((t (:foreground "#d6d6d4" :background "#1c1e1f"))))
|
||||
'(tooltip ((t (:foreground "#d6d6d4" :background "#2d2e2e"))))
|
||||
'(mode-line ((t (:box nil :background "#2d2e2e"))))
|
||||
'(mode-line-buffer-id ((t (:weight bold))))
|
||||
'(mode-line-emphasis ((t (:foreground "#fd971f"))))
|
||||
'(mode-line-highlight ((t (:inherit (highlight)))))
|
||||
'(mode-line-inactive ((t (:box nil :foreground "#4e4e4e" :background "#171819"))))
|
||||
'(isearch ((t (:foreground "#1B2229" :background "#b6e63e"))))
|
||||
'(isearch-fail ((t (:weight bold :foreground "#1B2229" :background "#e74c3c"))))
|
||||
'(lazy-highlight ((t (:weight bold :foreground "#1B2229" :background "#9c91e4"))))
|
||||
'(match ((t (:weight bold :foreground "#b6e63e" :background "#1B2229"))))
|
||||
'(next-error ((t (:inherit (region)))))
|
||||
'(query-replace ((t (:inherit (isearch)))))
|
||||
'(outline-1 ((t (:foreground "#fb2874"))))
|
||||
'(org-block ((t (:background "gray8"))))
|
||||
'(ido-subdir ((t (:foreground "deepskyblue"))))
|
||||
'(eshell-prompt ((t (:foreground "deepskyblue" :weight bold))))
|
||||
'(company-tooltip-common ((((background light)) (:foreground "darkred")) (((background dark)) (:foreground "red"))))
|
||||
'(company-tooltip ((t (:background "gray10" :foreground "white"))))
|
||||
'(company-tooltip-selection ((t (:background "firebrick4"))))
|
||||
'(org-quote ((t (:inherit org-block :slant italic :family "Liberation Mono"))))
|
||||
'(org-verse ((t (:inherit org-block :slant oblique :family "Liberation Mono"))))
|
||||
'(hl-line ((t (:extend t :background "gray9"))))
|
||||
'(default ((t (:inherit nil :extend nil :stipple nil :background "black" :foreground "#d6d6d4" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :foundry "ADBO" :family "ibm plex mono")))))
|
||||
|
||||
(provide-theme 'monokai)
|
||||
60
Emacs/.config/emacs/elisp/personal-theme.el
Normal file
60
Emacs/.config/emacs/elisp/personal-theme.el
Normal file
@@ -0,0 +1,60 @@
|
||||
(deftheme personal
|
||||
"Created 2020-09-06.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'personal
|
||||
'(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white"))))
|
||||
'(fixed-pitch ((t (:family "Monospace"))))
|
||||
'(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif"))))
|
||||
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
|
||||
'(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
|
||||
'(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue"))))
|
||||
'(highlight ((((class color) (min-colors 88) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 88) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 16) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 16) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 8)) (:foreground "black" :background "green")) (t (:inverse-video t))))
|
||||
'(region ((t (:extend t :background "gray20"))))
|
||||
'(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 ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t))))
|
||||
'(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t))))
|
||||
'(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold))))
|
||||
'(font-lock-comment-delimiter-face ((t (:slant italic :foreground "gray24"))))
|
||||
'(font-lock-comment-face ((t (:slant italic :foreground "#868686"))))
|
||||
'(font-lock-constant-face ((t (:foreground "slate gray" :weight bold :height 0.9 :family "Source Code Pro"))))
|
||||
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
|
||||
'(font-lock-function-name-face ((t (:weight semi-bold))))
|
||||
'(font-lock-keyword-face ((t (:family "Fira Code" :height 0.95 :weight bold :foreground "DeepSkyBlue4"))))
|
||||
'(font-lock-negation-char-face ((t nil)))
|
||||
'(font-lock-preprocessor-face ((t (:family "Source Code Pro" :foreground "#868686"))))
|
||||
'(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))
|
||||
'(font-lock-regexp-grouping-construct ((t (:inherit (bold)))))
|
||||
'(font-lock-string-face ((t (:family "Fira Code" :foreground "yellow4"))))
|
||||
'(font-lock-type-face ((t (:family "Hack" :height 0.95 :foreground "chartreuse"))))
|
||||
'(font-lock-variable-name-face ((t (:family "Source Code Variable" :foreground "#e6e6e6"))))
|
||||
'(font-lock-warning-face ((t (:inherit (error)))))
|
||||
'(button ((t (:inherit (link)))))
|
||||
'(link ((t (:underline (:color foreground-color :style line) :foreground "cyan1"))))
|
||||
'(link-visited ((t (:foreground "violet" :inherit (link)))))
|
||||
'(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray"))))
|
||||
'(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 "black"))))
|
||||
'(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 "grey30" :background "grey7" :inherit (mode-line)))))
|
||||
'(isearch ((t (:foreground "brown4" :background "white"))))
|
||||
'(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t))))
|
||||
'(lazy-highlight ((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) (((class color) (min-colors 16)) (:background "turquoise3")) (((class color) (min-colors 8)) (:background "turquoise3")) (t (:underline (:color foreground-color :style line)))))
|
||||
'(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)))))
|
||||
'(company-tooltip ((t (:background "navy blue" :foreground "white"))))
|
||||
'(company-tooltip-selection ((t (:background "gray31"))))
|
||||
'(company-tooltip-annotation ((t (:foreground "grey" :slant italic))))
|
||||
'(company-preview ((((background light)) (:inherit (company-tooltip-selection company-tooltip))) (((background dark)) (:foreground "wheat" :background "blue4"))))
|
||||
'(company-preview-common ((t (:inherit company-preview :foreground "grey"))))
|
||||
'(org-block ((t (:background "gray3" :inherit shadow))))
|
||||
'(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :height 113 :weight normal :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "#b6b6b6" :background "#000000" :stipple nil :inherit nil))))
|
||||
'(eshell-prompt ((t (:foreground "deep sky blue" :weight bold))))
|
||||
'(whitespace-tab ((t (:background "gray5" :foreground "gray20"))))
|
||||
'(whitespace-space ((t (:background "gray2" :foreground "darkgray")))))
|
||||
|
||||
(provide-theme 'personal)
|
||||
Reference in New Issue
Block a user