├── .gitignore ├── shinmera-pass.el ├── shinmera-java.el ├── shinmera-vim.el ├── shinmera-go.el ├── shinmera-rust.el ├── shinmera-elixir.el ├── shinmera-perspective.el ├── shinmera-python.el ├── shinmera-flycheck.el ├── shinmera-mail.el ├── shinmera-arduino.el ├── shinmera-glsl.el ├── README.md ├── shinmera-js.el ├── shinmera-treesitter.el ├── shinmera-lua.el ├── shinmera-treemacs.el ├── shinmera-native.el ├── shinmera-web.el ├── shinmera-shell.el ├── shinmera-company.el ├── shinmera.el ├── shinmera-paredit.el ├── shinmera-magit.el ├── shinmera-modules.el ├── shinmera-straight.el ├── shinmera-tex.el ├── shinmera-spell.el ├── shinmera-c.el ├── shinmera-faststart.el ├── shinmera-misc.el ├── shinmera-lisp.el └── shinmera-general.el /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc -------------------------------------------------------------------------------- /shinmera-pass.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package pass 4 | :demand t 5 | :config (auth-source-pass-enable)) 6 | 7 | (provide 'shinmera-pass) 8 | -------------------------------------------------------------------------------- /shinmera-java.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package jdee 4 | :commands (jdee-mode) 5 | :mode ("\\.java\\'" . jdee-mode)) 6 | 7 | (provide 'shinmera-java) 8 | -------------------------------------------------------------------------------- /shinmera-vim.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package evil 4 | :custom 5 | (evil-respect-visual-line-mode t) 6 | (evil-undo-system 'undo-redo) 7 | :config 8 | (evil-mode)) 9 | 10 | (provide 'shinmera-vim) 11 | -------------------------------------------------------------------------------- /shinmera-go.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package go-mode 4 | :commands (go-mode) 5 | :mode ("\\.go\\'" . go-mode)) 6 | 7 | (use-package company-go 8 | :demand t 9 | :after (go-mode company)) 10 | 11 | (provide 'shinmera-go) 12 | -------------------------------------------------------------------------------- /shinmera-rust.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package rustic 4 | :commands (rustic-mode) 5 | :mode 6 | ("\\.rs\\'" . rustic-mode)) 7 | 8 | (use-package lsp-mode 9 | :demand t 10 | :after (rustic)) 11 | 12 | (provide 'shinmera-rust) 13 | -------------------------------------------------------------------------------- /shinmera-elixir.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package elixir-mode 4 | :commands (elixir-mode) 5 | :mode ("\\.exs?" . elixir-mode)) 6 | 7 | (use-package alchemist 8 | :demand t 9 | :after (elixir-mode)) 10 | 11 | (provide 'shinmera-elixir) 12 | -------------------------------------------------------------------------------- /shinmera-perspective.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package perspective 4 | :commands persp-list-buffers 5 | :bind ("C-x C-b" . persp-list-buffers) 6 | :custom (persp-mode-prefix-key (kbd "C-c M-p")) 7 | :config (persp-mode)) 8 | 9 | (provide 'shinmera-perspective) 10 | -------------------------------------------------------------------------------- /shinmera-python.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package python-mode 4 | :commands (python-mode) 5 | :mode ("\\.py\\'" . python-mode)) 6 | 7 | (use-package flycheck-pyflakes 8 | :demand t 9 | :after (python-mode flycheck) 10 | :hook (python-mode . flycheck-mode)) 11 | 12 | (provide 'shinmera-python) 13 | -------------------------------------------------------------------------------- /shinmera-flycheck.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package flycheck 4 | :hook (c-mode . flycheck-mode)) 5 | 6 | (use-package flycheck-posframe 7 | :demand t 8 | :after (flycheck) 9 | :hook (flycheck-mode . flycheck-posframe-mode) 10 | :config 11 | (flycheck-posframe-configure-pretty-defaults) 12 | (add-hook 'flycheck-posframe-inhibit-functions #'company--active-p)) 13 | 14 | (provide 'shinmera-flycheck) 15 | -------------------------------------------------------------------------------- /shinmera-mail.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package smtpmail 4 | :demand t 5 | :custom 6 | (user-full-name "Yukari Hafner") 7 | (smtpmail-local-domain "tymoon.eu") 8 | (user-mail-address "shinmera@tymoon.eu") 9 | (send-mail-function 'smtpmail-send-it) 10 | (smtpmail-smtp-server "smtp.tymoon.eu") 11 | (smtpmail-stream-type 'starttls) 12 | (smtpmail-smtp-service 587)) 13 | 14 | (provide 'shinmera-mail) 15 | -------------------------------------------------------------------------------- /shinmera-arduino.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package arduino-mode 4 | :commands (arduino-mode) 5 | :hook (arduino-mode . irony-mode) 6 | :mode ("\\.ino\\'" . arduino-mode)) 7 | 8 | (use-package arduino-cli-mode 9 | :demand t 10 | :after (arduino-mode)) 11 | 12 | (use-package company-arduino 13 | :demand t 14 | :after (company arduino-mode) 15 | :hook (irony-mode . company-arduino-turn-on)) 16 | 17 | (provide 'shinmera-arduino) 18 | -------------------------------------------------------------------------------- /shinmera-glsl.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package glsl-mode 4 | :commands (glsl-mode) 5 | :mode 6 | ("\\.glsl\\'" . glsl-mode)) 7 | 8 | (use-package company-glsl 9 | :demand t 10 | :after (company glsl-mode)) 11 | 12 | (use-package hlsl-mode 13 | :commands (hlsl-mode) 14 | :straight (:type git :repo "https://github.com/darfink/hlsl-mode") 15 | :mode 16 | ("\\.hlsl\\'" . hlsl-mode) 17 | ("\\.fx\\'" . hlsl-mode)) 18 | 19 | (provide 'shinmera-glsl) 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repository has [moved](https://shinmera.com/projects/.emacs)! 2 | Due to Microsoft's continued enshittification of the platform this repository has been moved to [Codeberg](https://shinmera.com/projects/.emacs) in August of 2025. It will not receive further updates or patches. **Issues and pull requests will not be looked at here either**, please submit your patches and issue tickets on Codeberg, or send them directly via good old email patches to [shirakumo@tymoon.eu](mailto:shirakumo@tymoon.eu). 3 | 4 | Thanks. -------------------------------------------------------------------------------- /shinmera-js.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package js2-mode 4 | :commands (js2-mode js2-minor-mode) 5 | :mode ("\\.js\\'" . js2-mode) 6 | :hook 7 | (js-mode . js2-minor-mode) 8 | (js2-mode . (lambda () (add-hook 'xref-backend-functions #'xref-js2-xref-backend nil t))) 9 | :bind (:map js-mode-map ("M-." . nil)) 10 | :config (font-lock-add-keywords 'js2-mode '(("self" . font-lock-constant-face)))) 11 | 12 | (use-package xref-js2 13 | :demand t 14 | :after (js2-mode)) 15 | 16 | (provide 'shinmera-js) 17 | -------------------------------------------------------------------------------- /shinmera-treesitter.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (setq treesit-language-source-alist 4 | '((cpp "https://github.com/tree-sitter/tree-sitter-cpp") 5 | (c "https://github.com/tree-sitter/tree-sitter-c"))) 6 | 7 | (use-package tree-sitter-langs 8 | :demand t 9 | :after tree-sitter) 10 | 11 | (use-package treesit-auto 12 | :demand t 13 | :custom 14 | (treesit-auto-install 'prompt) 15 | :config 16 | (treesit-auto-add-to-auto-mode-alist 'all) 17 | (global-treesit-auto-mode)) 18 | 19 | (provide 'shinmera-treesitter) 20 | -------------------------------------------------------------------------------- /shinmera-lua.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package lua-mode 4 | :commands (lua-mode) 5 | :mode 6 | ("\\.lua\\'" . lua-mode)) 7 | 8 | (use-package company-lua 9 | :demand t 10 | :after (company lua-mode) 11 | :config 12 | (define-hook lua-mode-hook () 13 | (setq-local company-backends '((company-lua 14 | company-etags 15 | company-dabbrev-code))))) 16 | 17 | (use-package flymake-lua 18 | :demand t 19 | :after (lua-mode)) 20 | 21 | (provide 'shinmera-lua) 22 | -------------------------------------------------------------------------------- /shinmera-treemacs.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package treemacs 4 | :commands treemacs treemacs-find-file 5 | :custom (treemacs-width 40) 6 | :hook (treemacs-mode . (lambda () (display-line-numbers-mode -1))) 7 | :bind (:map shinmera-global-map 8 | ("C-x d" . treemacs))) 9 | 10 | (use-package treemacs-projectile 11 | :after treemacs projectile) 12 | 13 | (use-package treemacs-magit 14 | :after treemacs magit) 15 | 16 | (use-package treemacs-all-the-icons 17 | :after treemacs all-the-icons 18 | :config (treemacs-load-theme "all-the-icons")) 19 | 20 | (provide 'shinmera-treemacs) 21 | -------------------------------------------------------------------------------- /shinmera-native.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package wakib-keys 4 | :hook 5 | (after-change-major-mode-hook . wakib-update-major-mode-map) 6 | (menu-bar-update-hook . wakib-update-minor-mode-maps) 7 | :config 8 | (wakib-keys 1) 9 | (cua-selection-mode 1)) 10 | 11 | (use-package undo-tree 12 | :diminish undo-tree-mode 13 | :defer 2 14 | :custom 15 | (undo-tree-auto-save-history nil) 16 | :bind 17 | ("C-S-z" . undo-tree-redo) 18 | (:map undo-tree-visualizer-mode-map 19 | ([remap left-char] . undo-tree-visualize-switch-branch-left) 20 | ([remap right-char] . undo-tree-visualize-switch-branch-right)) 21 | :config 22 | (global-undo-tree-mode)) 23 | 24 | (provide 'shinmera-native) 25 | -------------------------------------------------------------------------------- /shinmera-web.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package web-mode 4 | :commands (web-mode) 5 | :mode 6 | ("\\.htm\\'" . web-mode) 7 | ("\\.html\\'" . web-mode) 8 | ("\\.xhtml\\'" . web-mode) 9 | ("\\.ctml\\'" . web-mode) 10 | :custom 11 | (web-mode-markup-indent-offset 2) 12 | (web-mode-css-indent-offset 4) 13 | (web-mode-code-indent-offset 4) 14 | (web-mode-style-padding 2) 15 | (web-mode-script-padding 2)) 16 | 17 | (use-package rainbow-mode 18 | :commands (rainbow-mode) 19 | :hook (css-mode . rainbow-mode)) 20 | 21 | (use-package lass 22 | :commands (lass-mode) 23 | :straight (:type git :repo "https://shinmera.com/project/LASS") 24 | :mode ("\\.lass\\'" . lass-mode)) 25 | 26 | (provide 'shinmera-web) 27 | -------------------------------------------------------------------------------- /shinmera-shell.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package xterm-color 4 | :config (setenv "TERM" "xterm-256color")) 5 | 6 | (use-package eshell 7 | :bind (:map eshell-mode-map ("C-c M-o" . eshell-clear-output)) 8 | :config 9 | (define-hook eshell-before-prompt-hook () 10 | (setq xterm-color-preserve-properties t))) 11 | 12 | (setq comint-output-filter-functions 13 | (remove 'ansi-color-process-output comint-output-filter-functions)) 14 | 15 | (define-hook shell-mode-hook () 16 | (add-hook 'comint-preoutput-filter-functions 'xterm-color-filter nil t)) 17 | 18 | (defun eshell-clear-output () 19 | (interactive) 20 | (let ((inhibit-read-only t)) 21 | (erase-buffer) 22 | (eshell-send-input))) 23 | 24 | (provide 'shinmera-shell) 25 | -------------------------------------------------------------------------------- /shinmera-company.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package company 4 | :defer 0.5 5 | :bind (:map company-active-map 6 | ("" . company-select-previous) 7 | ("" . company-select-next) 8 | ("\C-n" . company-select-next) 9 | ("\C-p" . company-select-previous) 10 | ("\C-d" . company-show-doc-buffer) 11 | ("M-." . company-show-location)) 12 | :config (global-company-mode 1)) 13 | 14 | (use-package company-posframe 15 | :demand t 16 | :after (company) 17 | :custom 18 | (company-posframe-quickhelp-delay 0.1) 19 | (company-posframe-show-metadata t) 20 | :config (company-posframe-mode 1)) 21 | 22 | ;; (use-package company-quickhelp 23 | ;; :demand t 24 | ;; :after (company) 25 | ;; :custom (company-quickhelp-delay 0.7) 26 | ;; :config (company-quickhelp-mode 1)) 27 | 28 | (provide 'shinmera-company) 29 | -------------------------------------------------------------------------------- /shinmera.el: -------------------------------------------------------------------------------- 1 | (setq debug-on-error t) 2 | 3 | (require 'shinmera-faststart) 4 | 5 | (defvar shinmera-global-map (make-keymap)) 6 | (define-minor-mode shinmera-global-minor-mode 7 | "" :init-value t :lighter " Shinmera" :keymap shinmera-global-map) 8 | 9 | (shinmera-global-minor-mode 1) 10 | (define-hook minibuffer-setup-hook () 11 | (shinmera-global-minor-mode 0)) 12 | 13 | (defadvice load (after shinmera-global-map) 14 | (if (not (eq (car (car minor-mode-map-alist)) 'shinmera-global-minor-mode)) 15 | (let ((mode-map (assq 'shinmera-global-minor-mode minor-mode-map-alist))) 16 | (assq-delete-all 'shinmera-global-minor-mode minor-mode-map-alist) 17 | (add-to-list 'minor-mode-map-alist mode-map)))) 18 | 19 | (ad-activate 'load) 20 | 21 | (require 'shinmera-straight) 22 | (require 'shinmera-modules) 23 | 24 | (define-hook after-init-hook () 25 | (setq debug-on-error nil)) 26 | (provide 'shinmera) 27 | -------------------------------------------------------------------------------- /shinmera-paredit.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package paredit 4 | :defer 1 5 | :commands (enable-paredit-mode paredit-mode) 6 | :bind (:map paredit-mode-map 7 | ("C-M-p" . nil) 8 | ("C-M-n" . nil) 9 | ("M-g" . raise-sexp) 10 | ("C-M-?" . paredit-convolute-sexp) 11 | ("M-s" . paredit-splice-sexp-killing-backward) 12 | ("M-S" . paredit-splice-sexp-killing-forward)) 13 | :hook 14 | (emacs-lisp-mode . enable-paredit-mode) 15 | (lisp-mode . enable-paredit-mode) 16 | (lisp-interaction-mode . enable-paredit-mode) 17 | (scheme-mode . enable-paredit-mode) 18 | (slime-repl-mode . enable-paredit-mode) 19 | :config 20 | (put 'paredit-forward-delete 'delete-selection 'supersede) 21 | (put 'paredit-backward-delete 'delete-selection 'supersede) 22 | (put 'paredit-newline 'delete-selection t)) 23 | 24 | (provide 'shinmera-paredit) 25 | -------------------------------------------------------------------------------- /shinmera-magit.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package magit 4 | :commands magit 5 | :custom 6 | (git-commit-fill-column 9999) 7 | (git-commit-summary-max-length 9999) 8 | (git-commit-finish-query-functions nil) 9 | (magit-format-file-function #'magit-format-file-all-the-icons) 10 | (magit-delete-by-moving-to-trash nil) 11 | (magit-no-confirm '(stage-all-changes unstage-all-changes))) 12 | 13 | (use-package magit-todos 14 | :demand t 15 | :after magit 16 | :custom 17 | (magit-todos-keywords-list (mapcar #'car hl-todo-keyword-faces)) 18 | (magit-todos-auto-group-items 50) 19 | (magit-todos-exclude-globs '(".git/" "docs/")) 20 | :config 21 | (magit-todos-mode)) 22 | 23 | (use-package magit-lfs 24 | :demand t 25 | :after magit) 26 | 27 | (use-package git-timemachine 28 | :commands git-timemachine) 29 | 30 | (use-package git-modes) 31 | 32 | (use-package blamer 33 | :commands blamer-mode) 34 | 35 | (provide 'shinmera-magit) 36 | -------------------------------------------------------------------------------- /shinmera-modules.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: elisp; lexical-binding: t; -*- 2 | (require 'cl-lib) 3 | 4 | (defvar shinmera-module-list 5 | '(:general :spell :pass :mail :perspective :treemacs :company :flycheck :magit :paredit :lisp :tex :web :js :c :java :shell :glsl :elixir :arduino :go :python :lua :rust :misc :vim :native :treesitter)) 6 | 7 | (defvar shinmera-default-module-list 8 | '(:general :spell :pass :mail :perspective :treemacs :company :flycheck :magit :paredit :lisp :tex :web :js :c :java :shell :glsl :elixir :arduino :go :python :lua :rust :misc)) 9 | 10 | (defcustom shinmera-modules (copy-sequence shinmera-default-module-list) 11 | "Which modules to load on startup" 12 | :type `(set ,@(cl-loop for module in shinmera-module-list 13 | collect `(const ,module))) 14 | :group 'shinmera) 15 | 16 | (dolist (module shinmera-modules) 17 | (let ((name (intern (concat "shinmera-" (substring (symbol-name module) 1))))) 18 | (require name))) 19 | 20 | (provide 'shinmera-modules) 21 | -------------------------------------------------------------------------------- /shinmera-straight.el: -------------------------------------------------------------------------------- 1 | (setq straight-use-package-by-default t 2 | use-package-always-defer t 3 | straight-cache-autoloads t 4 | straight-vc-git-default-clone-depth 1 5 | straight-check-for-modifications '(find-when-checking) 6 | package-enable-at-startup nil 7 | vc-follow-symlinks t) 8 | 9 | (defvar bootstrap-version) 10 | (let ((bootstrap-file 11 | (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) 12 | (bootstrap-version 5)) 13 | (unless (file-exists-p bootstrap-file) 14 | (with-current-buffer 15 | (url-retrieve-synchronously 16 | "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 17 | 'silent 'inhibit-cookies) 18 | (goto-char (point-max)) 19 | (eval-print-last-sexp))) 20 | (load bootstrap-file nil 'nomessage)) 21 | 22 | (setq vc-follow-symlinks 'ask) ; restore default 23 | 24 | (require 'straight-x) 25 | (straight-use-package 'use-package) 26 | 27 | (provide 'shinmera-straight) 28 | -------------------------------------------------------------------------------- /shinmera-tex.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package auctex 4 | :commands (auctex-mode) 5 | :mode ("\\.tex\\'" . auctex-mode) 6 | :hook 7 | (TeX-mode . (lambda () (TeX-fold-mode 1))) 8 | :custom 9 | (TeX-engine 'luatex) 10 | (LaTeX-babel-hyphen nil) 11 | (TeX-master nil) 12 | (TeX-PDF-mode t) 13 | (TeX-parse-self t) 14 | (TeX-auto-save t) 15 | (TeX-source-correlate-method 'synctex) 16 | (TeX-source-correlate-mode t) 17 | (TeX-source-correlate-start-server t) 18 | (TeX-view-program-list '(("Okular" "okular --unique %o#src:%n%b"))) 19 | (TeX-view-program-selection '((output-pdf "Okular")))) 20 | 21 | (use-package company-auctex 22 | :demand t 23 | :after (company auctex) 24 | :config (add-to-list 'company-backends 'company-auctex)) 25 | 26 | (use-package company-bibtex 27 | :demand t 28 | :after (company auctex) 29 | :config (add-to-list 'company-backends 'company-bibtex)) 30 | 31 | (use-package citar 32 | :demand t 33 | :after (auctex) 34 | :hook (LaTeX-mode . citar-capf-setup)) 35 | 36 | (provide 'shinmera-tex) 37 | -------------------------------------------------------------------------------- /shinmera-spell.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (setq used-spelling-dictionaries '("en_GB" "en_US" "de_CH")) 4 | 5 | (use-package jinx 6 | :defer 2 7 | :custom (jinx-languages (car used-spelling-dictionaries)) 8 | :config (global-jinx-mode)) 9 | 10 | (use-package ispell 11 | :demand t 12 | :custom (ispell-dictionary (car used-spelling-dictionaries))) 13 | 14 | (use-package flyspell 15 | :commands (flyspell-prog-mode flyspell-mode) 16 | :hook 17 | (slime-mode . flyspell-prog-mode) 18 | (emacs-lisp-mode . flyspell-prog-mode) 19 | (TeX-mode . flyspell-prog-mode) 20 | (text-mode . flyspell-mode) 21 | (markless-mode . flyspell-mode) 22 | (markdown-mode . flyspell-mode)) 23 | 24 | (defun switch-dictionary () 25 | (interactive) 26 | (let* ((old ispell-current-dictionary) 27 | (new (nth (mod (1+ (cl-position old used-spelling-dictionaries)) 28 | (length used-spelling-dictionaries)) 29 | used-spelling-dictionaries))) 30 | (ispell-change-dictionary new) 31 | (message "Dictionary switched from %s to %s" old new))) 32 | 33 | (provide 'shinmera-spell) 34 | -------------------------------------------------------------------------------- /shinmera-c.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package irony 4 | :commands (irony-mode) 5 | :hook 6 | (c-mode . irony-mode) 7 | (c++-mode . irony-mode)) 8 | 9 | (use-package company-irony 10 | :demand t 11 | :after (company irony) 12 | :hook 13 | (c-mode . company-mode) 14 | (c++-mode . company-mode) 15 | (objc-mode . company-mode) 16 | :config 17 | (add-to-list 'company-backends 'company-irony)) 18 | 19 | (use-package company-irony-c-headers 20 | :demand t 21 | :after (company-irony) 22 | :config 23 | (add-to-list 'company-backends 'company-irony-c-headers)) 24 | 25 | (use-package company-c-headers 26 | :demand t 27 | :after (company)) 28 | 29 | (use-package cmake-ide 30 | :commands (cmake-ide-compile cmake-ide-run-cmake)) 31 | 32 | (use-package cmake-mode 33 | :commands (cmake-mode) 34 | :mode ("\\'CMakeLists.txt\\'" . cmake-mode)) 35 | 36 | (use-package realgud 37 | :commands (realgud:pdb)) 38 | 39 | (use-package realgud-lldb 40 | :demand t 41 | :after realgud 42 | :commands (realgud:lldb)) 43 | 44 | (if (version< emacs-version "29.0") 45 | (use-package csharp-mode 46 | :commands (csharp-mode) 47 | :mode ("\\.cs\\'" . csharp-mode))) 48 | 49 | (defun etags (dir-name) 50 | "Create tags file." 51 | (interactive "DDirectory: ") 52 | (shell-command 53 | (format "find '%s' -type f -regex '.*\.[ch]\(pp\|xx\)?' | etags -" dir-name))) 54 | 55 | (provide 'shinmera-c) 56 | -------------------------------------------------------------------------------- /shinmera-faststart.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: t; -*- 2 | ;;;; Various things to speed up the emacs startup time 3 | (defvar comp-deferred-compliation) 4 | (setq comp-deferred-compilation t) 5 | (setq package-enable-at-startup nil) 6 | (setq frame-inhibit-implied-resize t) 7 | (setq site-run-file nil) 8 | (setq inhibit-compacting-font-caches t) 9 | 10 | (when (boundp 'read-process-output-max) 11 | (setq read-process-output-max 1048576)) 12 | 13 | (defmacro define-hook (hook args &rest body) 14 | `(add-hook ',hook (lambda ,args ,@body))) 15 | 16 | ;; Hide bars 17 | (menu-bar-mode -1) 18 | (unless (and (display-graphic-p) (eq system-type 'darwin)) 19 | (push '(menu-bar-lines . 0) default-frame-alist)) 20 | (push '(tool-bar-lines . 0) default-frame-alist) 21 | (push '(vertical-scroll-bars) default-frame-alist) 22 | 23 | ;; Strangle the GC a bit for better startup times 24 | (defvar shinmera-gc-cons-threshold 16777216) 25 | (setq gc-cons-threshold most-positive-fixnum 26 | gc-cons-percentage 0.6 27 | garbage-collection-messages t) 28 | (define-hook emacs-startup-hook () 29 | (setq gc-cons-threshold shinmera-gc-cons-threshold 30 | gc-cons-percentage 0.1)) 31 | (define-hook minibuffer-setup-hook () 32 | (setq gc-cons-threshold most-positive-fixnum)) 33 | (define-hook minibuffer-exit-hook () 34 | (run-at-time 1 nil (lambda () (setq gc-cons-threshold shinmera-gc-cons-threshold)))) 35 | 36 | ;; avoid special file handling during startup 37 | (defvar shinmera--file-name-handler-alist file-name-handler-alist) 38 | (setq file-name-handler-alist nil) 39 | (define-hook emacs-startup-hook () 40 | (setq file-name-handler-alist shinmera--file-name-handler-alist)) 41 | 42 | (provide 'shinmera-faststart) 43 | -------------------------------------------------------------------------------- /shinmera-misc.el: -------------------------------------------------------------------------------- 1 | (require 'shinmera-straight) 2 | 3 | (use-package dockerfile-mode 4 | :commands (dockerfile-mode) 5 | :mode ("\\'Dockerfile\\'" . dockerfile-mode)) 6 | 7 | (use-package yaml-mode 8 | :commands (yaml-mode) 9 | :mode 10 | ("\\.yml\\'" . yaml-mode) 11 | ("\\.ksy\\'" . yaml-mode)) 12 | 13 | (use-package markdown-mode 14 | :commands (markdown-mode) 15 | :mode 16 | ("\\.md\\'" . markdown-mode) 17 | ("\\.markdown\\'" . markdown-mode) 18 | :hook 19 | (markdown-mode . olivetti-mode) 20 | (gfm-mode . olivetti-mode)) 21 | 22 | (use-package markless 23 | :commands (markless-mode) 24 | :mode 25 | ("\\.mess\\'" . markless-mode) 26 | ("\\.markless\\'" . markless-mode) 27 | :hook (markless-mode . olivetti-mode)) 28 | 29 | (use-package csv-mode 30 | :commands (csv-mode) 31 | :mode ("\\.csv\\'" . csv-mode)) 32 | 33 | (use-package git-modes 34 | :commands (gitattributes-mode gitconfig-mode gitignore-mode) 35 | :mode 36 | ("\\'\\.gitattributes\\'" . gitattributes-mode) 37 | ("\\'\\.gitconfig" . gitconfig-mode) 38 | ("\\'\\.gitmodules" . gitconfig-mode) 39 | ("\\'\\.gitignore" . gitignore-mode)) 40 | 41 | (use-package bnf-mode 42 | :commands (bnf-mode) 43 | :mode ("\\.bnf\\'" . bnf-mode)) 44 | 45 | (use-package nginx-mode 46 | :commands nginx-mode) 47 | 48 | (use-package gdscript-mode 49 | :commands (gdscript-mode) 50 | :mode ("\\.gd\\'" . gdscript-mode)) 51 | 52 | (use-package json-mode 53 | :commands (json-mode) 54 | :mode ("\\.json\\'" . json-mode)) 55 | 56 | (use-package sql-indent 57 | :config 58 | (sql-set-product 'postgres) 59 | (let* ((postgres (alist-get 'postgres sql-product-alist)) 60 | (syntax (plist-get postgres :syntax-alist))) 61 | (plist-put postgres :syntax-alist (cons '(?\" . "\"") syntax)))) 62 | 63 | (provide 'shinmera-misc) 64 | -------------------------------------------------------------------------------- /shinmera-lisp.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: elisp; lexical-binding: t; -*- 2 | (require 'shinmera-straight) 3 | 4 | (use-package elisp-mode 5 | :straight (:type built-in) 6 | :custom 7 | (lisp-loop-indent-subclauses nil) 8 | (lisp-loop-indent-forms-like-keywords t) 9 | (lisp-lambda-list-keyword-parameter-alignment t)) 10 | 11 | (use-package elisp-slime-nav 12 | :commands (elisp-slime-nav-mode) 13 | :hook (emacs-lisp-mode . elisp-slime-nav-mode)) 14 | 15 | (use-package macrostep 16 | :commands (macrostep-mode macrostep-expand)) 17 | 18 | (use-package hyperspec 19 | :commands (hyperspec-lookup)) 20 | 21 | (use-package slime 22 | :commands (slime slime-connect common-lisp-mode) 23 | :bind 24 | (:map slime-mode-map 25 | ("C-c s" . slime-selector)) 26 | (:map slime-xref-mode-map 27 | ("n" . nil) ([remap next-line] . nil) 28 | ("p" . nil) ([remap previous-line] . nil)) 29 | (:map slime-inspector-mode-map 30 | ("," . slime-inspector-pop)) 31 | (:map slime-repl-mode-map 32 | ("" . nil) 33 | ("C-M-p" . slime-repl-backward-input) 34 | ("C-M-n" . slime-repl-forward-input) 35 | ("RET" . slime-repl-return-at-end) 36 | ("" . slime-repl-return-at-end)) 37 | :mode 38 | ("\\.sexp\\'" . common-lisp-mode) 39 | ("\\.lisp\\'" . common-lisp-mode) 40 | ("\\.asd\\'" . common-lisp-mode) 41 | :custom 42 | (slime-contribs '(slime-asdf slime-autodoc 43 | slime-cl-indent slime-compiler-notes-tree 44 | slime-fontifying-fu slime-fuzzy 45 | slime-hyperdoc slime-indentation 46 | slime-macrostep slime-mdot-fu 47 | slime-quicklisp slime-references 48 | slime-repl slime-sprof slime-trace-dialog 49 | slime-tramp slime-xref-browser)) 50 | (slime-completion-at-point-functions '(slime-filename-completion slime-fuzzy-complete-symbol)) 51 | (slime-net-coding-system 'utf-8-unix) 52 | (slime-startup-animation nil) 53 | (slime-auto-select-connection 'always) 54 | (slime-kill-without-query-p t) 55 | (slime-description-autofocus t ) 56 | (slime-fuzzy-explanation "") 57 | (slime-asdf-collect-notes t) 58 | (slime-inhibit-pipelining nil) 59 | (slime-load-failed-fasl 'always) 60 | (slime-when-complete-filename-expand t) 61 | (slime-export-symbol-representation-auto t) 62 | (initial-major-mode 'common-lisp-mode) 63 | (initial-scratch-message ";; Scratch Common Lisp 64 | ") 65 | :config 66 | (defun slime-repl-return-at-end () 67 | (interactive) 68 | (if (<= (point-max) (point)) 69 | (slime-repl-return) 70 | (slime-repl-newline-and-indent))) 71 | (slime-setup)) 72 | 73 | (defmacro define-lisp-implementations (&rest decl) 74 | `(progn 75 | ,@(cl-loop for (symbol . args) in decl 76 | collect `(progn 77 | (defun ,symbol () 78 | (interactive) 79 | (slime ',symbol)) 80 | (cl-pushnew '(,symbol ,@args) slime-lisp-implementations 81 | :key 'car))))) 82 | 83 | (with-eval-after-load "slime" 84 | (when (or (eq system-type 'gnu/linux) 85 | (eq system-type 'darwin)) 86 | (define-lisp-implementations 87 | (abcl ("abcl")) 88 | (acl ("alisp")) 89 | (ccl ("ccl")) 90 | (clasp ("clasp")) 91 | (clisp ("clisp")) 92 | (cmucl ("cmucl" "-quiet")) 93 | (ecl ("ecl")) 94 | (mkcl ("mkcl")) 95 | (xcl ("xcl")) 96 | (sbcl-win ("sbcl-win" "--dynamic-space-size" "8192")) 97 | (sbcl ("sbcl" "--dynamic-space-size" "8192")))) 98 | 99 | (when (eq system-type 'windows-nt) 100 | (define-lisp-implementations 101 | (ccl ("wx86cl64.exe")) 102 | (ccl32 ("wx86cl.exe")) 103 | (clisp ("clisp.exe")) 104 | (sbcl ("sbcl.exe" "--dynamic-space-size" "8192"))))) 105 | 106 | (use-package slime-company 107 | :demand t 108 | :after (slime company) 109 | :hook 110 | ((slime-mode slime-repl-mode sldb-mode) . slime-company-maybe-enable) 111 | :custom 112 | (slime-company-completion 'fuzzy)) 113 | 114 | (when window-system 115 | (run-with-timer 1 0 'slime)) 116 | 117 | (provide 'shinmera-lisp) 118 | -------------------------------------------------------------------------------- /shinmera-general.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: elisp; lexical-binding: t; -*- 2 | (require 'shinmera-straight) 3 | 4 | (add-to-list 'load-path (file-name-directory load-file-name)) 5 | 6 | (use-package better-defaults 7 | :straight (better-defaults :type git :host nil :repo "https://git.sr.ht/~technomancy/better-defaults") 8 | :demand t 9 | :bind (:map global-map 10 | ("C-z" . nil))) 11 | 12 | (use-package no-littering 13 | :demand t 14 | :config 15 | (setq auto-save-file-name-transforms 16 | `((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))) 17 | 18 | (use-package multiple-cursors 19 | :commands (mc/mark-next-like-this mc/mark-previous-like-this mc/mark-all-like-this) 20 | :bind (:map shinmera-global-map 21 | ("C-S-f" . mc/mark-next-like-this) 22 | ("C-S-b" . mc/mark-previous-like-this) 23 | ("C-S-a" . mc/mark-all-like-this) 24 | ("C-M-S-f" . mc/unmark-next-like-this) 25 | ("C-M-S-b" . mc/unmark-previous-like-this))) 26 | 27 | (use-package expand-region 28 | :commands (er/expand-region) 29 | :custom (shift-select-mode nil) 30 | :bind (:map shinmera-global-map 31 | ("C-q" . er/expand-region))) 32 | 33 | (use-package doom-themes 34 | :if window-system 35 | :defer t 36 | :config 37 | (doom-themes-visual-bell-config) 38 | (doom-themes-treemacs-config)) 39 | 40 | (use-package doom-modeline 41 | :demand t 42 | :config (doom-modeline-mode 1)) 43 | 44 | (use-package openwith 45 | :if window-system 46 | :demand t 47 | :custom 48 | (openwith-associations 49 | (cl-loop for ext in '("png" "jpg" "jpeg" "gif" "svg" 50 | "pdf" "blend" "ttf" "kra" 51 | "wav" "mp3" "opus" "oga" "qoa" "flac" 52 | "ogv" "mp4" "mkv" "avi") 53 | collect (list (concat "\\." ext "\\'") "xdg-open" '(file)))) 54 | :config (openwith-mode t)) 55 | 56 | (use-package dirvish 57 | :demand t 58 | :defer 2 59 | :config (dirvish-override-dired-mode)) 60 | 61 | (use-package smex 62 | :commands (smex smex-major-mode-commands) 63 | :config (smex-initialize) 64 | :bind (:map shinmera-global-map 65 | ("M-x" . smex) 66 | ("M-X" . smex-major-mode-commands))) 67 | 68 | (use-package fic-mode 69 | :defer 1) 70 | 71 | (use-package helpful 72 | :commands (helpful-callable helpful-variable helpful-key) 73 | :bind (:map shinmera-global-map 74 | ("C-h f" . helpful-callable) 75 | ("C-h v" . helpful-variable) 76 | ("C-h k" . helpful-key))) 77 | 78 | (use-package olivetti 79 | :commands olivetti-mode 80 | :custom (olivetti-body-width 100)) 81 | 82 | (use-package nerd-icons 83 | :if window-system 84 | :demand t) 85 | 86 | (use-package all-the-icons 87 | :if window-system 88 | :demand t) 89 | 90 | (use-package all-the-icons-dired 91 | :if window-system 92 | :defer 1 93 | :after all-the-icons 94 | :hook (dired-mode . all-the-icons-dired-mode)) 95 | 96 | (use-package all-the-icons-nerd-fonts 97 | :if window-system 98 | :defer 1 99 | :after all-the-icons) 100 | 101 | (use-package centaur-tabs 102 | :if window-system 103 | :defer 1 104 | :after all-the-icons 105 | :custom 106 | (centaur-tabs-height 32) 107 | (centaur-tabs-style "bar") 108 | (centaur-tabs-set-icons t) 109 | (centaur-tabs-gray-out-icons 'buffer) 110 | (centaur-tabs-set-bar 'under) 111 | (centaur-tabs-adjust-buffer-order t) 112 | (x-underline-at-descent-line t) 113 | :config 114 | (centaur-tabs-enable-buffer-alphabetical-reordering) 115 | (centaur-tabs-headline-match) 116 | (centaur-tabs-mode t)) 117 | 118 | (use-package projectile 119 | :demand t 120 | :bind (:map projectile-mode-map ("C-c p" . projectile-command-map)) 121 | :config 122 | (projectile-save-known-projects) 123 | (projectile-mode +1)) 124 | 125 | (use-package server 126 | :demand t 127 | :config 128 | (define-hook after-init-hook () 129 | (unless (or (server-running-p) 130 | (eq system-type 'windows-nt)) 131 | (server-start)))) 132 | 133 | (use-package gcmh 134 | :demand t 135 | :config (gcmh-mode 1)) 136 | 137 | (use-package ag 138 | :commands (ag)) 139 | 140 | (use-package persistent-soft 141 | :if window-system 142 | :demand t) 143 | 144 | (use-package unicode-fonts 145 | :if window-system 146 | :demand t 147 | :after persistent-soft 148 | :config 149 | (unicode-fonts-setup) 150 | (custom-set-faces 151 | '(default ((t (:family "Noto Sans Mono" :height 100)))) 152 | '(variable-pitch ((t (:family "Noto Sans" :height 100)))))) 153 | 154 | (use-package crux 155 | :commands (sudo 156 | crux-reopen-as-root 157 | crux-transpose-windows 158 | crux-rename-file-and-buffer 159 | crux-delete-file-and-buffer 160 | crux-recentf-find-file 161 | crux-open-with) 162 | :bind (:map shinmera-global-map 163 | ("C-c o" . crux-open-with) 164 | ("C-c f" . crux-recentf-find-file) 165 | ("C-c k" . crux-delete-file-and-buffer) 166 | ("C-c r" . crux-rename-file-and-buffer) 167 | ("C-x 4 t" . crux-transpose-windows)) 168 | :config 169 | (defun sudo () 170 | (interactive) 171 | (crux-reopen-as-root))) 172 | 173 | (use-package hl-todo 174 | :custom 175 | (hl-todo-keyword-faces '(("KLUDGE" . "#d0bf8f") 176 | ("HACK" . "#d0bf8f") 177 | ("TODO" . "#D98C32") 178 | ("FIXME" . "#EF681F") 179 | ("WTF" . "#F8240E"))) 180 | :config 181 | (global-hl-todo-mode)) 182 | 183 | (use-package stillness-mode 184 | :demand t 185 | :straight (stillness-mode :host github :repo "neeasade/stillness-mode.el" :branch "main")) 186 | 187 | (ido-mode 1) 188 | (ido-everywhere 1) 189 | (show-paren-mode 1) 190 | (electric-indent-mode 1) 191 | (delete-selection-mode 1) 192 | (global-so-long-mode) 193 | (global-display-line-numbers-mode 1) 194 | (global-font-lock-mode 1) 195 | (global-auto-revert-mode 1) 196 | (if (fboundp 'pixel-scroll-precision-mode) 197 | (pixel-scroll-precision-mode)) 198 | 199 | (setq-default indent-tabs-mode nil) 200 | (setq-default buffer-file-coding-system 'utf-8-unix) 201 | (setq-default tab-width 4) 202 | (setq-default dired-listing-switches "-alh") 203 | (setq inhibit-startup-screen t) 204 | (setq inhibit-startup-message t) 205 | (setq inhibit-startup-echo-area-message (user-login-name)) 206 | (setq custom-safe-themes t) 207 | (setq create-lockfiles nil) 208 | (setq backup-by-copying t) 209 | (setq delete-old-versions t) 210 | (setq confirm-kill-processes nil) 211 | (setq show-paren-delay 0) 212 | (setq sentence-end-double-space nil) 213 | (setq enable-local-variables :all) 214 | (setq use-short-answers t) 215 | (setq vc-follow-symlinks t) 216 | (setq browse-url-browser-function 'browse-url-generic) 217 | (setq browse-url-generic-program (or (getenv "BROWSER") "xdg-open")) 218 | (setq ring-bell-function 'ignore) 219 | (setq scroll-conservatively 101) 220 | (setq scroll-preserve-screen-position 1) 221 | (setq pixel-scroll-precision-use-momentum t) 222 | (setq ido-enable-flex-matching t) 223 | (setq ido-create-new-buffer 'always) 224 | (setq ido-use-filename-at-point 'nil) 225 | (setq ido-ignore-extensions t) 226 | (setq byte-compile-warnings '(not obsolete)) 227 | (setq warning-suppress-log-types '((comp) (bytecomp))) 228 | (setq native-comp-async-report-warnings-errors 'silent) 229 | (put 'upcase-region 'disabled nil) 230 | (make-variable-buffer-local 'compile-command) 231 | (add-hook 'prog-mode-hook 'subword-mode) 232 | 233 | (when window-system 234 | (context-menu-mode) 235 | (define-hook emacs-startup-hook () 236 | (load-theme 'doom-molokai t))) 237 | 238 | (when (eq system-type 'darwin) 239 | (setq mac-command-modifier 'control) 240 | (setq ns-function-modifier 'super) 241 | (setq ns-right-alternate-modifier nil)) 242 | 243 | ;; Auto-indent yank 244 | (dolist (command '(yank yank-pop)) 245 | (eval `(defadvice ,command (after indent-region activate) 246 | (and (not current-prefix-arg) 247 | (member major-mode '(emacs-lisp-mode lisp-mode 248 | clojure-mode scheme-mode 249 | haskell-mode ruby-mode 250 | rspec-mode python-mode 251 | c-mode c++-mode 252 | objc-mode latex-mode 253 | plain-tex-mode)) 254 | (let ((mark-even-if-inactive transient-mark-mode)) 255 | (indent-region (region-beginning) (region-end) nil)))))) 256 | 257 | (define-key shinmera-global-map (kbd "C-S-q") 'quoted-insert) 258 | 259 | ;; Adjust PATH to be more generally suitable 260 | (defun add-to-path (&rest things) 261 | (cond ((eql system-type 'windows-nt) 262 | (setenv "PATH" (concat (mapconcat (lambda (a) (replace-regexp-in-string "/" "\\\\" a)) things ";") 263 | ";" (getenv "PATH")))) 264 | (t 265 | (setenv "PATH" (concat (mapconcat 'identity things ":") 266 | ":" (getenv "PATH"))))) 267 | (setq exec-path (append exec-path things))) 268 | 269 | (when (eq system-type 'darwin) 270 | (add-to-path "/usr/local/bin") 271 | (add-to-path "/opt/local/bin")) 272 | 273 | (when (eq system-type 'linux) 274 | (add-to-path "/usr/local/bin")) 275 | 276 | (provide 'shinmera-general) 277 | --------------------------------------------------------------------------------