add a bunch of stuff

This commit is contained in:
2026-04-28 20:33:19 -04:00
parent 4319ab9b29
commit 5b16a222ca
2 changed files with 43 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@@ -5,7 +6,7 @@
;; If there is more than one, they won't work right.
'(package-selected-packages
'(cape dumb-jump exec-path-from-shell jai-mode magit move-text
multiple-cursors))
multiple-cursors yaml yaml-mode))
'(package-vc-selected-packages
'((jai-mode :url "https://github.com/valignatev/jai-mode.git"))))
(custom-set-faces

48
init.el
View File

@@ -1,14 +1,22 @@
;; -*- lexical-binding: t; -*-
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(set-frame-font "BerkeleyMono 14" nil t)
(if (string= system-type "darwin")
(set-frame-font "Berkeley Mono 16" nil t)
(set-frame-font "BerkeleyMono 14" nil t))
(load-theme 'modus-vivendi)
(defun hgh/edit-init-file ()
(interactive)
(find-file user-init-file))
(when (string= system-type "darwin")
(setq dired-use-ls-dired nil)
(setq mac-command-modifier 'control))
(keymap-global-set "M-o" #'other-window)
(keymap-global-set "C-c c" #'compile)
(keymap-global-set "M-0" #'delete-window)
@@ -18,9 +26,12 @@
(keymap-global-set "C-c e i" #'hgh/edit-init-file)
(setq
custom-file "/home/grant/.emacs.d/custom.el"
custom-file "~/.emacs.d/custom.el"
make-backup-files nil)
(setopt use-short-answers t)
(setopt use-dialog-box nil)
(ido-mode 1)
(fido-mode 1)
(global-completion-preview-mode 1)
@@ -30,6 +41,7 @@
(global-hl-line-mode 1)
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(if (file-exists-p custom-file)
(load-file custom-file))
@@ -62,9 +74,31 @@
:hook ((completion-at-point-functions . cape-dabbrev)
(completion-at-point-functions . cape-file)))
(use-package dumb-jump
:demand t
:custom
(dumb-jump-prefer-searcher 'rg)
(use-package dumber-jump
:init
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
(add-hook 'xref-backend-functions #'dumber-jump-xref-activate)
:config
(push
'(:language "jai" :type "function"
:supports ("ag" "grep" "rg" "git-grep")
:regex "\\bJJJ\\s*::"
:tests ("test ::"))
dumber-jump-find-rules)
(push
'(:language "jai" :type "variable"
:supports ("ag" "grep" "rg" "git-grep")
:regex "\\bJJJ\\s*(:|:\\s*=|::)"
:tests ("test: Type" "test : Type = Val" "test :: Val"))
dumber-jump-find-rules)
(push
'(:language "jai" :type "type"
:supports ("ag" "grep" "rg" "git-grep")
:regex "\\bJJJ\\s*::"
:tests ("test ::"))
dumber-jump-find-rules))
(use-package eglot
:config
(push '(jai-mode "jails") eglot-server-programs))
(use-package yaml-mode)