Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Vasile
Dotfiles
Commits
72f7bada
Commit
72f7bada
authored
5 months ago
by
James Vasile
Browse files
Options
Downloads
Patches
Plain Diff
Add my .emacs
parent
0a588d21
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/.emacs
+447
-0
447 additions, 0 deletions
files/.emacs
with
447 additions
and
0 deletions
files/.emacs
0 → 100644
+
447
−
0
View file @
72f7bada
;;; package --- Summary
;;;
;;; Emacs config file
;;;
;; Commentary:
;;;
;;; These first few override some of Emacs's most frustrating defaults.
;;; We put it early in the file because if anything in .emacs is
;;; broken, we at least want to turn off the goddam beeping. Having my
;;; laptop beep at me when I'm hitting the wrong keys because .emacs
;;; isn't loading my custom keys is extremely frustrating.
;;; Code:
(message "STARTING .EMACS")
;; Set this here, but unset it at the end of init
(setq debug-on-error t)
;; OMG, who wants beeps in this day and age?
(setq ring-bell-function 'ignore)
;; Don't ask about following symlinks into git dirs
(setq vc-follow-symlinks nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Save Desktop
;;
;; We don't actually want to save most things. If emacs is doing
;; restoration of themes, it interferes with us setting themes
;; because emacs doesn't respect our theme-per-frame as well as we
;; do.
;;
;; We do this high up in the .emacs because it is convenient to have
;; this already set in case we need to abort starting emacs, fix
;; .emacs, and try again.
(setq desktop-restore-frames nil)
(setq frameset-filter-alist
`((tabs . :never)
(background-color . :never)
(buffer-list . :never)
(buffer-predicate . :never)
(buried-buffer-list . :never)
(client . :never)
(delete-before . :never)
(font . :never)
(font-backend . :never)
(foreground-color . :never)
(frameset--text-pixel-height . :never)
(frameset--text-pixel-width . :never)
(fullscreen . :never)
(GUI:font . :never)
(GUI:fullscreen . :never)
(GUI:height . :never)
(GUI:width . :never)
(height . :never)
(outer-window-id . :never)
(parent-frame . :never)
(parent-id . :never)
(mouse-wheel-frame . :never)
(tty . frameset-filter-tty-to-GUI)
(tty-type . frameset-filter-tty-to-GUI)
(width . :never)
(window-id . :never)
(window-system . :never)
(name . :never)
(left . :never)
(minibuffer . :never)
(top . :never)
))
(desktop-save-mode 1)
(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.
'(package-selected-packages
'(dyalog-mode org-babel-eval-in-repl apl jedi ruff-format elpy evil-collecion xclip zoom-window yasnippet-snippets yaml-mode windata vterm typescript-mode tree-mode toml-mode tidal sly slime sass-mode rustic python-mode pkg-info pass origami org-roam neotree magit lua-mode lsp-ui load-theme-buffer-local kivy-mode gotest go-gen-test go-dlv fountain-mode evil-escape evil-commentary evil-collection elfeed edit-server dart-mode color-theme-modern coffee-mode auctex ansible-doc all-the-icons adoc-mode)))
(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.
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Looks
;;
;; Dark theme
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'dracula t)
;; Remove visual clutter
;; disable the menu bar, scrollbar, toolbar
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Packages
;;
;; Set up package handling
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Evil Mode
;;
;; evil-collection admonished me to set this before loading evil
(setq evil-want-keybinding nil)
;; load evil
(use-package evil
:ensure t ;; install the evil package if not installed
:init ;; tweak evil's configuration before loading it
(setq evil-search-module 'evil-search)
(setq evil-ex-complete-emacs-commands nil)
(setq evil-vsplit-window-right t)
(setq evil-split-window-below t)
(setq evil-shift-round nil)
(setq evil-want-C-u-scroll t)
:config ;; tweak evil after loading it
(evil-mode)
(evil-commentary-mode)
)
;; Bring evil keybindings to more modes
(use-package evil-collection :ensure t :init)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Languge Server Protocol
;;
(use-package lsp-mode :ensure t :init)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; APL
;;
;; I grabbed apl.el from https://www.metalevel.at/unicapl/ and it
;; doesn't appear to be in any elisp package archives.
;;
;; To use this, do M-x set-input-method (C-u C-\) then specify
;; apl-ascii. Toggle back and forth between regular and apl-ascii
;; with C-\. When apl-asii is active (you'll see "apl" in the
;; modeline while in evil insert mode), put an ascii string in curly
;; braces and apl.el will replace it with the appropriate apl symbol
;; when you hit the closing brace. The replacement is triggered by
;; typing the closing brace and if your editing doesn't trigger
;; (e.g. because you didn't type it straight through, do M-x
;; apl-ascii-to-unicode to convert any ones in the buffer.
;;
;; A table of apl symbols and their ascii triggers is at
;; https://www.metalevel.at/unicapl/asciiapl.pdf and I put a copy in
;; ~/.emacs.d/3p/apl too.
;;
;; That table is also reproduced here:
;; " ¨
;; #% ⌹
;; #O ⌼
;; % ÷
;; & ⋄
;; - −
;; -> →
;; -| ⊣
;; /= ≠
;; /=_ ≢
;; /\ ∆
;; /\| ⍋
;; /match ≢
;; <- ←
;; <= ≤
;; =_ ≡
;; >= ≥
;; @ ⍝
;; I ⌶
;; I-beam ⌶
;; O ○
;; O" ⍥
;; O* ⍟
;; O- ⊖
;; O\ ⍉
;; T ⊤
;; \/~ ⍫
;; abs ∣
;; alpha ⍺
;; and ∧
;; assign ←
;; backslash-bar ⍀
;; base ⊥
;; box ⎕
;; branch →
;; caret ∧
;; catenate ,
;; ceiling ⌈
;; circle ○
;; circle-backslash ⍉
;; circle-dash ⊖
;; circle-diaeresis ⍥
;; circle-star ⍟
;; circle-stile ⌽
;; comment ⍝
;; compress /
;; compress1 ⌿
;; deal ?
;; decode ⊥
;; del ∇
;; del-stile ⍒
;; del-tilde ⍫
;; delta ∆
;; delta-stile ⍋
;; depth ≡
;; dex ⊣
;; diaeresis ¨
;; diamond ⋄
;; disclose ⊃
;; divide ÷
;; domino ⌹
;; down-arrow ↓
;; down-caret ∨
;; down-shoe ∪
;; down-tack ⊤
;; downcaret-tilde ⍱
;; downtack-jot ⍕
;; drop ↓
;; each ¨
;; enclose ⊂
;; encode ⊤
;; enlist ∈
;; epsilon ∈
;; epsilon-underbar ⍷
;; epsilon_ ⍷
;; execute ⍎
;; exp ⋆
;; expand \
;; expand1 ⍀
;; find ⍷
;; first ↑
;; floor ⌊
;; format ⍕
;; gets ←
;; goto →
;; grade-down ⍒
;; grade-up ⍋
;; greater-of ⌈
;; greater-than-equal ≥
;; holler ⍥
;; hoot ⍤
;; index ⌷
;; index-of ⍳
;; intersect ∩
;; intersection ∩
;; inverted-caret ∨
;; iota ⍳
;; iota-underbar ⍸
;; iota_ ⍸
;; is ←
;; jot ∘
;; jot-diaeresis ⍤
;; laminate ,
;; lamp ⍝
;; left-arrow ←
;; left-shoe ⊂
;; left-tack ⊣
;; leftbrace {
;; less-than-equal ≤
;; lesser-of ⌊
;; lev ⊢
;; ln ⍟
;; log ⍟
;; mat-divide ⌹
;; mat-inverse ⌹
;; match ≡
;; max ⌈
;; member ∈
;; member-of ∈
;; min ⌊
;; minus −
;; nabla ∇
;; nand ⍲
;; nazg ∘
;; negative −
;; nor ⍱
;; not ∼
;; not-equal ≠
;; not-match ≢
;; o ○
;; o" ⍥
;; omega ⍵
;; or ∨
;; partition ⊂
;; pi-times ○
;; pick ⊃
;; pow ⋆
;; quad ⎕
;; quad-backslash ⍂
;; quad-circle ⌼
;; quad-divide ⌹
;; quote-quad ⍞
;; rank ⍤
;; ravel ,
;; reciprocal ÷
;; reduce /
;; reduce1 ⌿
;; replicate /
;; replicate1 ⌿
;; represent ⊤
;; reshape ⍴
;; residue ∣
;; reverse ⌽
;; rho ⍴
;; right-arrow →
;; right-shoe ⊃
;; right-tack ⊢
;; rightbrace }
;; ring ∘
;; roll ?
;; rotate ⊖
;; rotate ⊖
;; scan \
;; scan1 ⍀
;; shape ⍴
;; signum ×
;; slash-bar ⌿
;; slope-bar ⍀
;; star ⋆
;; stile ∣
;; take ↑
;; tilde ∼
;; times ×
;; transpose ⍉
;; type ∈
;; union ∪
;; up-arrow ↑
;; up-caret ∧
;; up-shoe ∩
;; up-tack ⊥
;; upcaret-tilde ⍲
;; upshoe-jot ⍝
;; uptack-jot ⍎
;; w ⍵
;; x ×
;; |- ⊢
;; ~ ∼
;; ~^ ⍲
;; ~v ⍱
;(add-to-list 'load-path "~/.emacs.d/3p/apl")
;(require 'apl)
;; This gives us synax highlighting (and other things,
;; I'm not using those)
;(add-to-list 'load-path "~/.emacs.d/3p/gnu-apl")
;(require 'gnu-apl-mode)
;(add-to-list 'auto-mode-alist '("\\.apl\\'" . gnu-apl-mode))
(use-package dyalog-mode
:ensure t
:config
(add-to-list 'auto-mode-alist '("\\.apl\\'" . dyalog-mode))
(add-to-list 'auto-mode-alist '("\\.dyalog$" . dyalog-mode))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Org Mode
(use-package org
:ensure t)
(setq org-src-fontify-natively t)
(setq org-confirm-babel-evaluate nil)
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)
(shell . t)
(lisp . t)
))
(setq org-confirm-babel-evaluate nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Python
;;
(use-package jedi ; elpy wants this
:ensure t
:config
; We only need to do this once, not every time we start emacs
;(jedi:install-server)
)
(use-package elpy
;; C-c C-p to launch REPL
;; C-c C-c to run the file in the REPL
:ensure t
:config
; enable elpy-goto-definition
(add-hook 'python-mode-hook 'jedi-mode)
(elpy-enable)
)
;; Connect to the python language server, enable completion.
(add-hook 'python-mode-hook #'lsp) ;; pip3 install python-lsp-server
(add-hook 'python-mode-hook #'yas-minor-mode) ;; completion needs this
(setq lsp-pylsp-plugins-rope-autoimport-enabled t)
;; enable ruff formatting linter
(use-package ruff-format
:ensure t
:config
;(add-hook 'python-mode-hook 'ruff-format-on-save-mode)
)
;; We use ipython as our shell interpreter, mostly because it's good
;; for org-mode.
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; YAML mode
;;
(add-to-list 'load-path "~/.emacs.d/3p/yaml-mode")
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
(add-hook 'yaml-mode-hook
(lambda ()
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(server-start)
;; We set this for init, but don't want it during normal operations
(setq debug-on-error nil)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment