aboutsummaryrefslogtreecommitdiffstats
path: root/oni-elisp
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-05-28 02:12:40 -0700
committerGravatar Tom Willemse2026-05-28 02:12:40 -0700
commit09a4099586657170cbdcff071b2d0fac5ed133b7 (patch)
tree8e8df3ca47bf2e89b430eb4f77e329dc78946320 /oni-elisp
parenta44d06182fbcb6b424b4ac699c69f7132c68acb6 (diff)
downloademacs-config-09a4099586657170cbdcff071b2d0fac5ed133b7.tar.gz
emacs-config-09a4099586657170cbdcff071b2d0fac5ed133b7.zip
oni-yasnippet: Move all snippets to ‘oni-yasnippet’
There is no real point in having them all separate. Having them all in a single place makes them much easier to manage.
Diffstat (limited to 'oni-elisp')
-rw-r--r--oni-elisp/Eldev13
-rw-r--r--oni-elisp/oni-elisp.el144
-rw-r--r--oni-elisp/snippets/emacs-lisp-mode/cookie5
-rw-r--r--oni-elisp/snippets/emacs-lisp-mode/depends-on5
-rw-r--r--oni-elisp/snippets/emacs-lisp-mode/depends-on-git5
-rw-r--r--oni-elisp/snippets/emacs-lisp-mode/face5
6 files changed, 0 insertions, 177 deletions
diff --git a/oni-elisp/Eldev b/oni-elisp/Eldev
deleted file mode 100644
index 1ba3134..0000000
--- a/oni-elisp/Eldev
+++ /dev/null
@@ -1,13 +0,0 @@
-; -*- mode: emacs-lisp; lexical-binding: t -*-
-
-;; Uncomment some calls below as needed for your project.
-(eldev-use-package-archive 'gnu-elpa)
-;(eldev-use-package-archive 'nongnu-elpa)
-(eldev-use-package-archive 'melpa)
-(eldev-use-package-archive `("oni" . ,(expand-file-name "../bin")))
-
-(eldev-use-plugin 'autoloads)
-
-(setf eldev-files-to-package
- `(:or ,eldev-files-to-package
- '("*.el" "./snippets/**/*")))
diff --git a/oni-elisp/oni-elisp.el b/oni-elisp/oni-elisp.el
deleted file mode 100644
index 2c4122c..0000000
--- a/oni-elisp/oni-elisp.el
+++ /dev/null
@@ -1,144 +0,0 @@
-;;; oni-elisp.el --- Emacs Lisp configuration -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2019 Tom Willemse
-
-;; Author: Tom Willemse <tom@ryuslash.org>
-;; Keywords: local
-;; Version: 2024.1101.071725
-;; Package-Requires: (oni-company oni-flycheck oni-paredit oni-yasnippet oni-hydra rainbow-delimiters nameless erefactor flycheck-relint elisp-format)
-
-;; 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:
-
-;; My configuration for working in Emacs Lisp.
-
-;;; Code:
-
-(require 'checkdoc)
-(require 'flycheck-relint)
-(require 'hydra)
-(require 'yasnippet)
-
-(let ((byte-compile-not-obsolete-funcs '(preceding-sexp)))
- (require 'erefactor))
-
-(require 'ielm)
-
-(defconst oni-elisp-root
- (file-name-directory
- (or load-file-name
- (buffer-file-name)))
- "The directory where ‘oni-elisp’ was loaded from.")
-
-(defconst oni-elisp-snippets-dir
- (expand-file-name "snippets" oni-elisp-root)
- "The directory where ‘oni-elisp’ stores its snippets.")
-
-(font-lock-add-keywords
- 'emacs-lisp-mode
- `((,(rx symbol-start
- (group (or "t"
- "nil"
- (and (optional "-")
- digit
- (minimal-match (zero-or-more (any digit ?.))))))
- symbol-end)
- 1 font-lock-constant-face)))
-
-(defun oni-elisp-snippets-initialize ()
- "Initialize the snippets for ‘oni-elisp’."
- (when (boundp 'yas-snippet-dirs)
- (add-to-list 'yas-snippet-dirs oni-elisp-snippets-dir t))
- (yas-load-directory oni-elisp-snippets-dir))
-
-(defun oni-elisp-auto-fill-mode ()
- "Enable ‘auto-fill-mode’ only for comments and inhibit for Package-Requires."
- (setq-local comment-auto-fill-only-comments t)
- (setq-local auto-fill-inhibit-regexp (rx line-start ";; Package-Requires: "))
- (auto-fill-mode))
-
-(defun oni-elisp-setup-ielm-mode-line ()
- "Clean up the mode-line for ielm buffers."
- (setq mode-line-buffer-identification
- (list (propertize "Interactive Emacs Lisp Mode" 'face 'mode-line-buffer-id))
- mode-line-format
- '("%e"
- mode-line-front-space
- mode-line-remote
- mode-line-frame-identification
- mode-line-buffer-identification
- " on "
- (:eval (buffer-name ielm-working-buffer))
- mode-line-end-spaces)))
-
-(defun oni-elisp-ielm-remove-paredit-newline-keys ()
- "Disable ‘C-j’ and ‘RET’ keybindings from ‘paredit-mode’."
- (let ((oldmap (map-elt minor-mode-map-alist 'paredit-mode))
- (newmap (make-sparse-keymap)))
- (set-keymap-parent newmap oldmap)
- (define-key newmap (kbd "RET") nil)
- (define-key newmap (kbd "C-j") nil)
- (make-local-variable 'minor-mode-overriding-map-alist)
- (push `(paredit-mode . ,newmap) minor-mode-overriding-map-alist)))
-
-(defhydra oni-elisp-hydra (:color teal :hint nil)
- "
-^Eval^
-^^----------
-_eb_: Buffer
-"
- ("eb" eval-buffer))
-
-(add-hook 'emacs-lisp-mode-hook #'oni-elisp-auto-fill-mode)
-(add-hook 'emacs-lisp-mode-hook 'company-mode)
-(add-hook 'emacs-lisp-mode-hook 'display-fill-column-indicator-mode)
-(add-hook 'emacs-lisp-mode-hook 'electric-quote-local-mode)
-(add-hook 'emacs-lisp-mode-hook 'erefactor-lazy-highlight-turn-on)
-(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
-(add-hook 'emacs-lisp-mode-hook 'nameless-mode)
-(add-hook 'emacs-lisp-mode-hook 'paredit-mode)
-(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)
-
-(add-hook 'ielm-mode-hook #'oni-elisp-ielm-remove-paredit-newline-keys)
-(add-hook 'ielm-mode-hook #'oni-elisp-setup-ielm-mode-line)
-(add-hook 'ielm-mode-hook 'company-mode)
-(add-hook 'ielm-mode-hook 'paredit-mode)
-
-(setq ielm-prompt "λ> ")
-
-(define-key emacs-lisp-mode-map (kbd "C-c r") erefactor-map)
-(define-key emacs-lisp-mode-map (kbd "C-c SPC") 'oni-elisp-hydra/body)
-
-;;;###autoload
-(add-to-list 'auto-mode-alist '("/Cask\\'" . emacs-lisp-mode))
-
-(add-to-list 'display-buffer-alist
- '("\\`\\*ielm\\*\\'" display-buffer-in-side-window
- (side . bottom)
- (slot . 0)
- (window-height . 0.33)))
-
-(with-eval-after-load 'elisp-mode
- (with-eval-after-load 'yasnippet
- (oni-elisp-snippets-initialize)))
-
-(flycheck-relint-setup)
-
-(add-hook 'emacs-lisp-mode-hook 'checkdoc-minor-mode)
-
-(setq checkdoc-spellcheck-documentation-flag t)
-
-(provide 'oni-elisp)
-;;; oni-elisp.el ends here
diff --git a/oni-elisp/snippets/emacs-lisp-mode/cookie b/oni-elisp/snippets/emacs-lisp-mode/cookie
deleted file mode 100644
index 6fafd3c..0000000
--- a/oni-elisp/snippets/emacs-lisp-mode/cookie
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: with-eval-after-load-cookie
-# key: cookie
-# --
-;;;###autoload(with-eval-after-load '${1:`(string-remove-prefix "oni-" (string-remove-suffix ".el" (buffer-name)))`-mode} (require '`(string-remove-suffix ".el" (buffer-name))`)) \ No newline at end of file
diff --git a/oni-elisp/snippets/emacs-lisp-mode/depends-on b/oni-elisp/snippets/emacs-lisp-mode/depends-on
deleted file mode 100644
index 4f99d92..0000000
--- a/oni-elisp/snippets/emacs-lisp-mode/depends-on
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet; require-final-newline: nil -*-
-# name: depends-on
-# key: do
-# --
-(depends-on "$1")$0 \ No newline at end of file
diff --git a/oni-elisp/snippets/emacs-lisp-mode/depends-on-git b/oni-elisp/snippets/emacs-lisp-mode/depends-on-git
deleted file mode 100644
index 1da2f31..0000000
--- a/oni-elisp/snippets/emacs-lisp-mode/depends-on-git
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: depends-on-git
-# key: do
-# --
-(depends-on "$1" :git "../" :files ("$1.el"))$0 \ No newline at end of file
diff --git a/oni-elisp/snippets/emacs-lisp-mode/face b/oni-elisp/snippets/emacs-lisp-mode/face
deleted file mode 100644
index 9fdbbb2..0000000
--- a/oni-elisp/snippets/emacs-lisp-mode/face
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet; require-final-newline: nil -*-
-# name: face
-# key: face
-# --
- `($1 ((t (${2::foreground} $0)))) \ No newline at end of file