diff options
| author | 2026-07-16 18:28:27 -0700 | |
|---|---|---|
| committer | 2026-08-26 23:04:25 -0700 | |
| commit | b446596ccbd4a4d6e768d9b3892fb7f5688e9592 (patch) | |
| tree | 77e751cf4693654912bc3fb651928ed6b7404de9 | |
| parent | 1e1eab1c306f78329ac70a59da0d03fddb12ad0e (diff) | |
| download | new-dotfiles-b446596ccbd4a4d6e768d9b3892fb7f5688e9592.tar.gz new-dotfiles-b446596ccbd4a4d6e768d9b3892fb7f5688e9592.zip | |
macos: Update emacs init file
| -rw-r--r-- | _mbsetupuser/.emacs.d/init.el | 170 | ||||
| -rw-r--r-- | _mbsetupuser/.emacs.d/init2.el | 58 |
2 files changed, 170 insertions, 58 deletions
diff --git a/_mbsetupuser/.emacs.d/init.el b/_mbsetupuser/.emacs.d/init.el new file mode 100644 index 0000000..4ad6019 --- /dev/null +++ b/_mbsetupuser/.emacs.d/init.el @@ -0,0 +1,170 @@ +;;; init.el --- Macos init file -*- lexical-binding: t; -*- + +;; Copyright (C) 2026 Tom Willemsen + +;; Author: Tom Willemsen <tom@punt.com> + +;; 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: + +;; Make a thing. + +;;; Code: + +(require 'package) + +(add-to-list 'package-archives '("oni" . "https://ryuslash.srht.site/emacs-config/packages/")) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) + +(use-package exec-path-from-shell + :if (eq system-type 'darwin) + :ensure t + :init + (exec-path-from-shell-initialize)) + +(use-package oni-package + :ensure t + :after package) + +(use-package oni-core + :demand t) + +(use-package oni-gui + :demand t) + +(use-package oni-elfeed + :after elfeed + :config + (require 'oni-elfeed) + (setq elfeed-feeds + '(("https://www.reddit.com/r/PHP/.rss" php) + ("https://phpreads.com/feed" php) + ("https://phpstan.org/rss.xml" php) + ("https://lobste.rs/t/php.rss" php) + ("https://mastodon.social/tags/PHP.rss" php) + ("https://wendelladriel.com/feed.rss" php)) + elfeed-curl-program-name "curl")) + +(use-package oni-data-dir) + +(use-package oni-eww + :after eww) + +(use-package oni-yasnippet + :after yasnippet) + +(use-package oni-php + :after php) + +(use-package oni-yaml + :after (yaml yaml-ts-mode)) + +(use-package oni-elisp) + +(use-package oni-org + :after org + :config + (setf (map-elt org-capture-templates "t") + '("A simple TODO item" entry (file "") "* TODO %? +:PROPERTIES: +:CREATED: %U +:END:")) + (setf (map-elt org-capture-templates "d") + '("A simple DONE item" entry (file "") "* DONE %? +:PROPERTIES: +:CREATED: %U +:END:")) + (setf (map-elt org-capture-templates "n") + '("A simple note" entry (file "") "* Note taken on %U +:PROPERTIES: +:CREATED: %U +:END: + +%?")) + (setf (map-elt org-capture-templates "N") + '("A simple note (on current task)" item (clock) "- Note taken on %U: \\\\ + %?")) + (setf (map-elt org-capture-templates "r") + '("An Operational Request came in" entry (file "") "* TODO Operation Request %^U +:PROPERTIES: +:CREATED: %U +:END: + +%c"))) + +(use-package consult-yasnippet + :vc (:url "https://git.sr.ht/~ryuslash/consult-yasnippet" + :rev :newest)) + +(use-package oni-paredit + :after paredit) + +(use-package oni-core) + +(use-package oni-outline + :after outline) + +(use-package terraform-mode) + +(use-package oni-dired + :ensure t + :after dired) + +(use-package docker-compose-mode + :ensure t + :mode (rx "docker-compose.yml" eos)) + +(use-package oni-corfu + :ensure t + :after corfu) + +(use-package corfu + :hook (docker-compose-mode typescript-ts-mode tsx-ts-mode) + :config + (setq corfu-auto t)) + +(use-package treesit + :if (and (functionp 'treesit-available-p) + (treesit-available-p)) + :defer t + :ensure nil + :config + (setq treesit-language-source-alist + '((yaml "https://github.com/ikatyang/tree-sitter-yaml") + (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") + (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") + (php "https://github.com/tree-sitter/tree-sitter-php" "master" "php/src"))) + (when (treesit-ready-p 'yaml) + (add-to-list 'major-mode-remap-alist '(yaml-mode . yaml-ts-mode))) + (when (treesit-ready-p 'typescript) + (add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))) + (when (treesit-ready-p 'tsx) + (add-to-list 'auto-mode-alist (cons (rx ".tsx" eos) 'tsx-ts-mode)))) + +(use-package electric-pair-mode + :hook (((tsx-ts-mode typescript-ts-mode) . electric-pair-local-mode))) + +(use-package rainbow-delimiters + :ensure t + :hook prog-mode) + +(use-package display-fill-column-indicator + :hook prog-mode) + +(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) +(load custom-file) + +(provide 'init) +;;; init.el ends here diff --git a/_mbsetupuser/.emacs.d/init2.el b/_mbsetupuser/.emacs.d/init2.el deleted file mode 100644 index 1208860..0000000 --- a/_mbsetupuser/.emacs.d/init2.el +++ /dev/null @@ -1,58 +0,0 @@ -;;; init2.el --- Macos init file -*- lexical-binding: t; -*- - -;; Copyright (C) 2026 Tom Willemsen - -;; Author: Tom Willemsen <tom@punt.com> -;; Keywords: local -;; Package-Requires: (oni-elfeed oni-outline terraform-mode) -;; Version: 10 - -;; 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: - -;; Make a thing. - -;;; Code: - -(require 'package) - -(add-to-list 'package-archives '("oni" . "https://ryuslash.srht.site/emacs-config/packages/")) - -(use-package elfeed - :config - (require 'oni-elfeed) - (setq elfeed-feeds - '(("https://www.reddit.com/r/PHP/.rss" php) - ("https://phpreads.com/feed" php) - ("https://phpstan.org/rss.xml" php) - ("https://lobste.rs/t/php.rss" php) - ("https://mastodon.social/tags/PHP.rss" php) - ("https://wendelladriel.com/feed.rss" php)) - elfeed-curl-program-name "curl")) - -(use-package oni-eww - :after eww) - -(use-package oni-yasnippet - :after yasnippet) - -(use-package oni-php - :after php) - -(use-package oni-yaml - :after (yaml yaml-ts-mode)) - -(provide 'init2) -;;; init2.el ends here |
