Initial commit
This commit is contained in:
11
.borgconfig
Normal file
11
.borgconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
[submodule "dash"]
|
||||
no-byte-compile = dash-functional.el
|
||||
no-makeinfo = dash-template.texi
|
||||
[submodule "emacsql"]
|
||||
no-byte-compile = emacsql-pg.el
|
||||
[submodule "magit"]
|
||||
no-byte-compile = lisp/magit-libgit.el
|
||||
[submodule "sqlite3"]
|
||||
build-step = make
|
||||
[submodule "libgit"]
|
||||
build-step = make
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/tree-sitter/
|
||||
/var/
|
||||
110
.gitmodules
vendored
Normal file
110
.gitmodules
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
[include]
|
||||
path = .borgconfig
|
||||
[submodule "annalist"]
|
||||
path = lib/annalist
|
||||
url = https://github.com/noctuid/annalist.el
|
||||
[submodule "auto-compile"]
|
||||
path = lib/auto-compile
|
||||
url = https://github.com/emacscollective/auto-compile
|
||||
[submodule "avy"]
|
||||
path = lib/avy
|
||||
url = https://github.com/abo-abo/avy
|
||||
[submodule "borg"]
|
||||
path = lib/borg
|
||||
url = git@github.com:emacscollective/borg.git
|
||||
[submodule "buttercup"]
|
||||
path = lib/buttercup
|
||||
url = https://github.com/jorgenschaefer/emacs-buttercup
|
||||
[submodule "closql"]
|
||||
path = lib/closql
|
||||
url = git@github.com:emacscollective/closql.git
|
||||
[submodule "compat"]
|
||||
path = lib/compat
|
||||
url = https://git.sr.ht/~pkal/compat
|
||||
[submodule "consult"]
|
||||
path = lib/consult
|
||||
url = https://github.com/minad/consult
|
||||
[submodule "consult-notes"]
|
||||
path = lib/consult-notes
|
||||
url = https://github.com/mclear-tools/consult-notes
|
||||
[submodule "corfu"]
|
||||
path = lib/corfu
|
||||
url = https://github.com/minad/corfu
|
||||
[submodule "dash"]
|
||||
path = lib/dash
|
||||
url = https://github.com/magnars/dash.el
|
||||
[submodule "denote"]
|
||||
path = lib/denote
|
||||
url = git@github.com:emacsmirror/denote.git
|
||||
[submodule "ef-themes"]
|
||||
path = lib/ef-themes
|
||||
url = git@github.com:emacsmirror/ef-themes.git
|
||||
[submodule "emacsql"]
|
||||
path = lib/emacsql
|
||||
url = git@github.com:skeeto/emacsql.git
|
||||
[submodule "embark"]
|
||||
path = lib/embark
|
||||
url = https://github.com/oantolin/embark
|
||||
[submodule "epkg"]
|
||||
path = lib/epkg
|
||||
url = git@github.com:emacscollective/epkg.git
|
||||
[submodule "evil"]
|
||||
path = lib/evil
|
||||
url = https://github.com/emacs-evil/evil
|
||||
[submodule "evil-collection"]
|
||||
path = lib/evil-collection
|
||||
url = https://github.com/emacs-evil/evil-collection
|
||||
[submodule "general"]
|
||||
path = lib/general
|
||||
url = https://github.com/noctuid/general.el
|
||||
[submodule "git-modes"]
|
||||
path = lib/git-modes
|
||||
url = https://github.com/magit/git-modes
|
||||
[submodule "libgit"]
|
||||
path = lib/libgit
|
||||
url = https://github.com/magit/libegit2
|
||||
[submodule "llama"]
|
||||
path = lib/llama
|
||||
url = https://git.sr.ht/~tarsius/llama
|
||||
[submodule "magit"]
|
||||
path = lib/magit
|
||||
url = https://github.com/magit/magit
|
||||
[submodule "marginalia"]
|
||||
path = lib/marginalia
|
||||
url = https://github.com/minad/marginalia
|
||||
[submodule "no-littering"]
|
||||
path = lib/no-littering
|
||||
url = https://github.com/emacscollective/no-littering
|
||||
[submodule "ob-go"]
|
||||
path = lib/ob-go
|
||||
url = https://github.com/pope/ob-go
|
||||
[submodule "orderless"]
|
||||
path = lib/orderless
|
||||
url = https://github.com/oantolin/orderless
|
||||
[submodule "org"]
|
||||
path = lib/org
|
||||
url = git@github.com:emacsmirror/org.git
|
||||
[submodule "projectile"]
|
||||
path = lib/projectile
|
||||
url = https://github.com/bbatsov/projectile
|
||||
[submodule "rainbow-delimiters"]
|
||||
path = lib/rainbow-delimiters
|
||||
url = https://github.com/Fanael/rainbow-delimiters
|
||||
[submodule "s"]
|
||||
path = lib/s
|
||||
url = https://github.com/magnars/s.el
|
||||
[submodule "sqlite3"]
|
||||
path = lib/sqlite3
|
||||
url = https://github.com/pekingduck/emacs-sqlite3-api
|
||||
[submodule "transient"]
|
||||
path = lib/transient
|
||||
url = https://github.com/magit/transient
|
||||
[submodule "vertico"]
|
||||
path = lib/vertico
|
||||
url = https://github.com/minad/vertico
|
||||
[submodule "which-key"]
|
||||
path = lib/which-key
|
||||
url = https://github.com/justbur/emacs-which-key
|
||||
[submodule "with-editor"]
|
||||
path = lib/with-editor
|
||||
url = https://github.com/magit/with-editor
|
||||
13
Makefile
Normal file
13
Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
DRONES_DIR = $(shell git config "borg.drones-directory" || echo "lib")
|
||||
|
||||
-include $(DRONES_DIR)/borg/borg.mk
|
||||
|
||||
bootstrap-borg:
|
||||
@git submodule--helper clone --name borg --path $(DRONES_DIR)/borg \
|
||||
--url git@github.com:emacscollective/borg.git
|
||||
@cd $(DRONES_DIR)/borg; git symbolic-ref HEAD refs/heads/master
|
||||
@cd $(DRONES_DIR)/borg; git reset --hard HEAD
|
||||
|
||||
|
||||
scrub-submodules:
|
||||
@for dir in `ls lib`; do printf "%s --\n" "$$dir"; cd "lib/$$dir"; for dirt in `git ls-files --others --exclude-standard`; do rm -iv "$$dirt"; done; cd ../..; done
|
||||
16
early-init.el
Normal file
16
early-init.el
Normal file
@@ -0,0 +1,16 @@
|
||||
;;; -*- lexical-binding: t -*-
|
||||
(setq load-prefer-newer t)
|
||||
|
||||
(let ((dir (file-name-directory (or load-file-name buffer-file-name))))
|
||||
(add-to-list 'load-path (expand-file-name "lib/compat" dir))
|
||||
(add-to-list 'load-path (expand-file-name "lib/packed" dir))
|
||||
(add-to-list 'load-path (expand-file-name "lib/auto-compile" dir)))
|
||||
(require 'auto-compile)
|
||||
(auto-compile-on-load-mode)
|
||||
(auto-compile-on-save-mode)
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
(with-eval-after-load 'package
|
||||
(add-to-list 'package-archives (cons "melpa" "https://melpa.org/packages/") t)
|
||||
(add-to-list 'package-archives (cons "org" "https://orgmode.org/elpa/") t))
|
||||
|
||||
301
init.el
Normal file
301
init.el
Normal file
@@ -0,0 +1,301 @@
|
||||
;; -*- lexical-binding: t -*-
|
||||
(progn
|
||||
(setq inhibit-startup-buffer-menu t)
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq initial-buffer-choice t)
|
||||
(setq initial-scratch-message "")
|
||||
|
||||
(scroll-bar-mode 0)
|
||||
(tool-bar-mode 0)
|
||||
(menu-bar-mode 0)
|
||||
(setq ns-use-proxy-icon nil)
|
||||
(setq frame-title-format nil)
|
||||
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
|
||||
|
||||
(setq isearch-allow-scroll t)
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq show-trailing-whitespace t)
|
||||
|
||||
(setq backup-by-copying t)
|
||||
|
||||
(set-default-coding-systems 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
|
||||
(defalias 'go-mode 'go-ts-mode)
|
||||
(defalias 'gomod-mode 'go-mod-ts-mode)
|
||||
|
||||
(defvar modus-themes-italic-constructs t)
|
||||
(defvar modus-themes-bold-constructs nil)
|
||||
(defvar modus-themes-mode-line '(borderless accented))
|
||||
(defvar modus-themes-region '(bg-only no-extend))
|
||||
|
||||
(load-theme 'modus-vivendi t)
|
||||
|
||||
(global-display-line-numbers-mode))
|
||||
|
||||
(eval-and-compile
|
||||
(add-to-list 'load-path (expand-file-name "lib/borg/" user-emacs-directory))
|
||||
(require 'borg)
|
||||
(borg-initialize))
|
||||
|
||||
(use-package auto-compile
|
||||
:config
|
||||
(setq auto-compile-display-buffer nil)
|
||||
(setq auto-compile-mode-line-counter t)
|
||||
(setq auto-compile-source-recreate-deletes-dest t)
|
||||
(setq auto-compile-toggle-deletes-nonlib-dest t))
|
||||
|
||||
(use-package epkg
|
||||
:defer t
|
||||
:init
|
||||
(setq epkg-repository (expand-file-name "var/epkgs/" user-emacs-directory)))
|
||||
|
||||
(use-package dash
|
||||
:config (global-dash-fontify-mode))
|
||||
|
||||
(use-package server
|
||||
:commands (server-running-p)
|
||||
:config (or (server-running-p) (server-mode)))
|
||||
|
||||
|
||||
(use-package magit
|
||||
:defer t
|
||||
:commands (magit-add-section-hook)
|
||||
:config
|
||||
(magit-add-section-hook 'magit-status-sections-hook
|
||||
'magit-insert-modules
|
||||
'magit-insert-stashes
|
||||
'append))
|
||||
|
||||
(use-package evil
|
||||
:hook (after-init . evil-mode)
|
||||
:init
|
||||
(setq evil-want-integration t)
|
||||
(setq evil-want-keybinding nil)
|
||||
(evil-mode t)
|
||||
:config
|
||||
(evil-set-initial-state 'shell-mode 'normal)
|
||||
(evil-set-initial-state 'doc-view-mode 'normal)
|
||||
(evil-set-initial-state 'package-menu-mode 'normal)
|
||||
(evil-set-initial-state 'biblio-selection-mode 'motion)
|
||||
(evil-global-set-key 'motion "gs" 'tab-bar-switch-to-tab)
|
||||
(setq doc-view-continuous t))
|
||||
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:init
|
||||
(evil-collection-init))
|
||||
|
||||
(use-package org
|
||||
:config
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
(setq org-export-use-babel nil)
|
||||
|
||||
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(plantuml . t)
|
||||
(C . t)
|
||||
(java . t)
|
||||
(shell . t)
|
||||
(sql . t)
|
||||
(go . t)
|
||||
(python . t))))
|
||||
|
||||
(use-package vertico
|
||||
:init
|
||||
(vertico-mode))
|
||||
|
||||
(use-package orderless
|
||||
:init
|
||||
(setq completion-styles '(orderless basic)
|
||||
completion-category-defaults nil
|
||||
completion-category-overrides '((eglot (styles orderless)) (file (styles partial-completion)))))
|
||||
|
||||
(use-package consult
|
||||
:config
|
||||
(defun find-fd (&optional dir initial)
|
||||
(interactive "P")
|
||||
(let ((consult-find-args "fzf -e"))
|
||||
(consult-find dir initial)))
|
||||
(autoload 'projectile-project-root "projectile")
|
||||
(setq consult-project-root-function #'projectile-project-root))
|
||||
|
||||
(use-package embark)
|
||||
|
||||
(use-package embark-consult
|
||||
:hook
|
||||
(embark-collect-mode . consult-preview-at-point-mode))
|
||||
|
||||
(use-package marginalia
|
||||
:custom
|
||||
(marginalia-align 'right)
|
||||
:init
|
||||
(marginalia-mode))
|
||||
|
||||
(use-package which-key
|
||||
:init (which-key-mode t))
|
||||
|
||||
(use-package general
|
||||
:after which-key
|
||||
:config
|
||||
(general-override-mode t)
|
||||
(general-auto-unbind-keys)
|
||||
|
||||
(general-define-key
|
||||
:keymaps 'key-translation-map
|
||||
"ESC" (kbd "C-g"))
|
||||
|
||||
(general-def
|
||||
"C-x x" 'eval-defun)
|
||||
|
||||
(general-create-definer tyrant-def
|
||||
:states '(normal visual insert motion emacs)
|
||||
:prefix "SPC"
|
||||
:non-normal-prefix "C-SPC")
|
||||
|
||||
(tyrant-def
|
||||
"" nil
|
||||
"SPC" (general-simulate-key "M-x")
|
||||
"c" (general-simulate-key "C-c")
|
||||
"h" (general-simulate-key "C-h")
|
||||
"u" (general-simulate-key "C-u")
|
||||
"x" (general-simulate-key "C-x")
|
||||
"w" (general-simulate-key "C-w")
|
||||
|
||||
":" 'shell-command
|
||||
"git" 'magit
|
||||
"rg" 'consult-ripgrep
|
||||
"fzf" 'consult-find
|
||||
|
||||
"em" '(:ignore t :which-key "emacs")
|
||||
"emr" (lambda ()
|
||||
(interactive)
|
||||
(load-file user-init-file))
|
||||
"emd" (lambda ()
|
||||
(interactive)
|
||||
(find-file user-init-file))
|
||||
|
||||
"t" '(:ignore t :which-key "themes")
|
||||
"ts" 'consult-theme
|
||||
|
||||
"b" '(:ignore t :which-key "buffers")
|
||||
"bl" 'switch-to-buffer
|
||||
"bd" 'kill-this-buffer
|
||||
|
||||
"f" '(:ignore t :which-key "files")
|
||||
"ff" 'find-file
|
||||
"fr" 'rename-file-and-buffer
|
||||
|
||||
"p" '(:ignore t :which-key "projects")
|
||||
"pf" 'projectile-find-file
|
||||
"psp" 'projectile-switch-project
|
||||
"psb" 'projectile-switch-buffer
|
||||
|
||||
"o" '(:ignore t :which-key "org")
|
||||
"oi" 'org-insert-structure-template
|
||||
"odu" 'org-update-all-dblocks
|
||||
|
||||
"n" '(:ignore t :which-key "notes/navigation")
|
||||
"nl" 'consult-notes
|
||||
"nxr" 'xref-find-references
|
||||
"nxd" 'xref-find-definitions
|
||||
|
||||
))
|
||||
|
||||
(use-package corfu
|
||||
:init
|
||||
(global-corfu-mode))
|
||||
|
||||
(use-package projectile
|
||||
:init
|
||||
(projectile-mode t)
|
||||
:config
|
||||
(setq projectile-require-project-root nil)
|
||||
(setq projectile-find-dir-includes-top-level t)
|
||||
(setq projectile-project-search-path '(
|
||||
"~/work/ost/"
|
||||
"~/work/private"
|
||||
)))
|
||||
|
||||
(use-package denote
|
||||
:config
|
||||
(setq denote-directory (expand-file-name "~/denote"))
|
||||
|
||||
(defun x/denote-journal ()
|
||||
(interactive)
|
||||
(let* ((today (format-time-string "%A %e %B %Y"))
|
||||
(string (denote-sluggify today))
|
||||
(files (denote-directory-files-matching-regexp string)))
|
||||
(cond
|
||||
((> (length files) 1)
|
||||
(find-file (completing-read "Select file: " files nil :require-match)))
|
||||
(files
|
||||
(find-file (car files)))
|
||||
(t
|
||||
(denote
|
||||
today
|
||||
'("journal"))))))
|
||||
|
||||
(defun x/denote-append-region-to-note (beg end)
|
||||
(interactive "r")
|
||||
(if-let (((region-active-p))
|
||||
(text (buffer-substring-no-properties beg end)))
|
||||
(progn
|
||||
(consult-notes)
|
||||
(goto-char (point-max))
|
||||
(insert text))
|
||||
(user-error "No region is available")))
|
||||
)
|
||||
|
||||
(use-package consult-notes
|
||||
:config
|
||||
(consult-notes-denote-mode))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:config
|
||||
(set-face-foreground 'rainbow-delimiters-depth-1-face "#c66")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-2-face "#6c6")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-3-face "#69f")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-4-face "#cc6")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-5-face "#6cc")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-6-face "#c6c")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-7-face "#ccc")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-8-face "#999")
|
||||
(set-face-foreground 'rainbow-delimiters-depth-9-face "#666"))
|
||||
|
||||
(use-package lisp-mode
|
||||
:config
|
||||
(add-hook 'lisp-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode))
|
||||
|
||||
(use-package no-littering)
|
||||
|
||||
(use-package custom
|
||||
:no-require t
|
||||
:config
|
||||
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
||||
(when (file-exists-p custom-file)
|
||||
(load custom-file)))
|
||||
|
||||
|
||||
;; http://steve.yegge.googlepages.com/my-dot-emacs-file
|
||||
(defun rename-file-and-buffer (new-name)
|
||||
"Renames both current buffer and file it's visiting to NEW-NAME."
|
||||
(interactive "New name: ")
|
||||
(let ((name (buffer-name))
|
||||
(filename (buffer-file-name)))
|
||||
(if (not filename)
|
||||
(message "Buffer '%s' is not visiting a file!" name)
|
||||
(if (get-buffer new-name)
|
||||
(message "A buffer named '%s' already exists!" new-name)
|
||||
(progn
|
||||
(rename-file name new-name t)
|
||||
(rename-buffer new-name)
|
||||
(set-visited-file-name new-name)
|
||||
(set-buffer-modified-p nil))))))
|
||||
|
||||
1
lib/annalist
Submodule
1
lib/annalist
Submodule
Submodule lib/annalist added at 134fa3f0fb
1
lib/auto-compile
Submodule
1
lib/auto-compile
Submodule
Submodule lib/auto-compile added at 6ed8e29d23
1
lib/avy
Submodule
1
lib/avy
Submodule
Submodule lib/avy added at be612110cb
1
lib/borg
Submodule
1
lib/borg
Submodule
Submodule lib/borg added at dcdd702dae
1
lib/buttercup
Submodule
1
lib/buttercup
Submodule
Submodule lib/buttercup added at 30c703d215
1
lib/closql
Submodule
1
lib/closql
Submodule
Submodule lib/closql added at 85ac7b8a89
1
lib/compat
Submodule
1
lib/compat
Submodule
Submodule lib/compat added at 3968002251
1
lib/consult
Submodule
1
lib/consult
Submodule
Submodule lib/consult added at fe49dedd71
1
lib/consult-notes
Submodule
1
lib/consult-notes
Submodule
Submodule lib/consult-notes added at c48b563f85
1
lib/corfu
Submodule
1
lib/corfu
Submodule
Submodule lib/corfu added at 3ba9851999
1
lib/dash
Submodule
1
lib/dash
Submodule
Submodule lib/dash added at f46268c75c
1
lib/denote
Submodule
1
lib/denote
Submodule
Submodule lib/denote added at 7702d37efd
1
lib/ef-themes
Submodule
1
lib/ef-themes
Submodule
Submodule lib/ef-themes added at ca3645c498
1
lib/emacsql
Submodule
1
lib/emacsql
Submodule
Submodule lib/emacsql added at 64012261f6
1
lib/embark
Submodule
1
lib/embark
Submodule
Submodule lib/embark added at 9a44418c34
1
lib/epkg
Submodule
1
lib/epkg
Submodule
Submodule lib/epkg added at 5acd45411b
1
lib/evil
Submodule
1
lib/evil
Submodule
Submodule lib/evil added at 669dc20279
1
lib/evil-collection
Submodule
1
lib/evil-collection
Submodule
Submodule lib/evil-collection added at 286d69de17
1
lib/general
Submodule
1
lib/general
Submodule
Submodule lib/general added at 833dea2c4a
1
lib/git-modes
Submodule
1
lib/git-modes
Submodule
Submodule lib/git-modes added at 44d536ba63
1
lib/libgit
Submodule
1
lib/libgit
Submodule
Submodule lib/libgit added at ab1a53a6a0
1
lib/llama
Submodule
1
lib/llama
Submodule
Submodule lib/llama added at 5c454f1a83
1
lib/magit
Submodule
1
lib/magit
Submodule
Submodule lib/magit added at decd5f40dd
1
lib/marginalia
Submodule
1
lib/marginalia
Submodule
Submodule lib/marginalia added at 866e50aee4
1
lib/no-littering
Submodule
1
lib/no-littering
Submodule
Submodule lib/no-littering added at fcfd51fbdf
1
lib/ob-go
Submodule
1
lib/ob-go
Submodule
Submodule lib/ob-go added at 2067ed55f4
1
lib/orderless
Submodule
1
lib/orderless
Submodule
Submodule lib/orderless added at e678402671
1
lib/org
Submodule
1
lib/org
Submodule
Submodule lib/org added at 34082ff184
1
lib/projectile
Submodule
1
lib/projectile
Submodule
Submodule lib/projectile added at 971cd5c4f2
1
lib/rainbow-delimiters
Submodule
1
lib/rainbow-delimiters
Submodule
Submodule lib/rainbow-delimiters added at a32b39bdfe
1
lib/s
Submodule
1
lib/s
Submodule
Submodule lib/s added at dda84d38ff
1
lib/sqlite3
Submodule
1
lib/sqlite3
Submodule
Submodule lib/sqlite3 added at b513b71012
1
lib/transient
Submodule
1
lib/transient
Submodule
Submodule lib/transient added at 323d6b6c84
1
lib/vertico
Submodule
1
lib/vertico
Submodule
Submodule lib/vertico added at d1dd2f74db
1
lib/which-key
Submodule
1
lib/which-key
Submodule
Submodule lib/which-key added at df6b0cb844
1
lib/with-editor
Submodule
1
lib/with-editor
Submodule
Submodule lib/with-editor added at a485378183
Reference in New Issue
Block a user