Add forge, hl-todo

This commit is contained in:
eriedaberrie 2023-03-08 22:34:06 -08:00
parent db3a294889
commit 443519b090

78
init.el
View file

@ -1,11 +1,17 @@
;;; EMACS init file -*- lexical-binding:t -*- ;;; EMACS init file -*- lexical-binding:t -*-
(defconst my-is-nixos (file-exists-p "/nix")
"Whether or not Emacs is running on NixOS.")
(when my-is-nixos
(setq auth-sources '("/run/agenix/authinfo")))
(with-eval-after-load 'package (with-eval-after-load 'package
(add-to-list 'package-archives (add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")) '("melpa" . "https://melpa.org/packages/"))
(package-initialize)) (package-initialize))
(setq use-package-always-ensure (not (file-exists-p "/nix")) (setq use-package-always-ensure (not my-is-nixos)
use-package-always-defer t use-package-always-defer t
use-package-expand-minimally t) use-package-expand-minimally t)
(require 'use-package) (require 'use-package)
@ -256,13 +262,14 @@
(use-package aggressive-indent (use-package aggressive-indent
:custom :custom
(aggressive-indent-sit-for-time 0.1) (aggressive-indent-sit-for-time 0.1)
:hook (emacs-lisp-mode :hook
emacs-lisp-mode
ielm-mode ielm-mode
lisp-mode lisp-mode
lisp-interaction-mode lisp-interaction-mode
scheme-mode scheme-mode
clojure-mode clojure-mode
nix-mode) nix-mode
:config :config
(with-eval-after-load 'meow (with-eval-after-load 'meow
(add-to-list 'aggressive-indent-protected-commands #'my-meow-undo) (add-to-list 'aggressive-indent-protected-commands #'my-meow-undo)
@ -280,20 +287,23 @@
(which-key-mode)) (which-key-mode))
(use-package lsp-mode (use-package lsp-mode
:hook ((c-ts-mode . lsp-deferred) :hook
(c-ts-mode . lsp-deferred)
(c++-ts-mode . lsp-deferred) (c++-ts-mode . lsp-deferred)
(html-mode . lsp-deferred) (html-mode . lsp-deferred)
(lsp-mode . lsp-enable-which-key-integration)) (lsp-mode . lsp-enable-which-key-integration)
:custom :custom
(read-process-output-max (* 1024 1024)) ; 1 MB (read-process-output-max (* 1024 1024)) ; 1 MB
(lsp-keymap-prefix "M-o")) (lsp-keymap-prefix "M-o"))
(use-package lsp-java (use-package lsp-java
:hook (java-ts-mode . lsp-deferred)) :hook
(java-ts-mode . lsp-deferred))
(use-package lsp-ui) (use-package lsp-ui)
(use-package lsp-treemacs (use-package lsp-treemacs
:hook (lsp-mode . lsp-treemacs-sync-mode)) :hook
(lsp-mode . lsp-treemacs-sync-mode))
(use-package dap-mode (use-package dap-mode
:bind (:map lsp-command-map ("d" . dap-hydra)) :bind (:map lsp-command-map ("d" . dap-hydra))
@ -327,19 +337,22 @@
(use-package yasnippet-snippets) (use-package yasnippet-snippets)
(use-package consult (use-package consult
:bind (("M-s r" . consult-ripgrep) :bind
("M-s r" . consult-ripgrep)
("M-s d" . consult-find) ("M-s d" . consult-find)
("C-x M-:" . consult-complex-command) ("C-x M-:" . consult-complex-command)
("C-x b" . consult-buffer) ("C-x b" . consult-buffer)
("C-x r b" . consult-bookmark))) ("C-x r b" . consult-bookmark))
(use-package consult-yasnippet (use-package consult-yasnippet
:bind (("C-c s" . consult-yasnippet) :bind
("C-c S" . consult-yasnippet-visit-snippet-file))) ("C-c s" . consult-yasnippet)
("C-c S" . consult-yasnippet-visit-snippet-file))
(use-package embark (use-package embark
:bind (("C-." . embark-act) :bind
("C-;" . embark-dwim))) ("C-." . embark-act)
("C-;" . embark-dwim))
(use-package embark-consult) (use-package embark-consult)
@ -388,7 +401,7 @@
:demand t) :demand t)
(use-package all-the-icons-completion (use-package all-the-icons-completion
:after (marginalia all-the-icons) :after marginalia all-the-icons
:hook (marginalia-mode . all-the-icons-completion-marginalia-setup) :hook (marginalia-mode . all-the-icons-completion-marginalia-setup)
:init :init
(all-the-icons-completion-mode)) (all-the-icons-completion-mode))
@ -434,9 +447,10 @@
(buffer-face-mode)) (buffer-face-mode))
(use-package org (use-package org
:hook ((org-mode . org-indent-mode) :hook
(org-mode . org-indent-mode)
(org-mode . auto-fill-mode) (org-mode . auto-fill-mode)
(org-mode . my-set-text-modes-font)) (org-mode . my-set-text-modes-font)
:custom-face :custom-face
(org-block ((t (:family "JetbrainsMono Nerd Font" :height 105)))) (org-block ((t (:family "JetbrainsMono Nerd Font" :height 105))))
(org-code ((t (:family "JetbrainsMono Nerd Font" :height 105)))) (org-code ((t (:family "JetbrainsMono Nerd Font" :height 105))))
@ -551,6 +565,10 @@
(use-package magit (use-package magit
:hook (git-commit-setup . my-magit-commit-text-setup)) :hook (git-commit-setup . my-magit-commit-text-setup))
(use-package forge
:after magit
:demand t)
(use-package tramp (use-package tramp
:custom :custom
(remote-file-name-inhibit-cache nil) (remote-file-name-inhibit-cache nil)
@ -561,14 +579,16 @@
tramp-file-name-regexp))) tramp-file-name-regexp)))
(use-package vterm (use-package vterm
:bind (("C-c t" . vterm) :bind
("C-c T" . vterm-other-window)) ("C-c t" . vterm)
("C-c T" . vterm-other-window)
:hook (vterm-mode . my-inhibit-hl-line-mode) :hook (vterm-mode . my-inhibit-hl-line-mode)
:config :config
(with-eval-after-load 'meow (with-eval-after-load 'meow
(defvar meow-vterm-normal-mode-map (defvar meow-vterm-normal-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
(define-key map (kbd "RET") #'vterm-send-return) map)) (define-key map (kbd "RET") #'vterm-send-return)
map))
(setq vterm-keymap-exceptions '("C-c")) (setq vterm-keymap-exceptions '("C-c"))
(define-key vterm-mode-map (kbd "C-c ESC") #'vterm-send-escape) (define-key vterm-mode-map (kbd "C-c ESC") #'vterm-send-escape)
(dolist (c '((yank . vterm-yank) (dolist (c '((yank . vterm-yank)
@ -598,9 +618,13 @@
(use-package xkcd) (use-package xkcd)
(use-package hl-todo
:hook prog-mode)
(use-package ligature (use-package ligature
:hook (prog-mode :hook
(ligature-mode . prettify-symbols-mode)) prog-mode
(ligature-mode . prettify-symbols-mode)
:custom :custom
(prettify-symbols-unprettify-at-point t) (prettify-symbols-unprettify-at-point t)
:config :config
@ -631,6 +655,8 @@
(defun my-load-theme-with-solaire () (defun my-load-theme-with-solaire ()
(load-theme 'catppuccin t) (load-theme 'catppuccin t)
(catppuccin-reload) (catppuccin-reload)
(face-spec-set 'font-lock-variable-name-face `((t (:foreground
,(catppuccin-get-color 'flamingo)))))
(solaire-global-mode) (solaire-global-mode)
(when (daemonp) (when (daemonp)
(remove-hook 'server-after-make-frame-hook #'my-load-theme-with-solaire))) (remove-hook 'server-after-make-frame-hook #'my-load-theme-with-solaire)))
@ -648,6 +674,16 @@
(add-hook 'server-after-make-frame-hook #'my-load-theme-with-solaire) (add-hook 'server-after-make-frame-hook #'my-load-theme-with-solaire)
(my-load-theme-with-solaire))) (my-load-theme-with-solaire)))
(use-package with-editor
:bind
([remap async-shell-command] . with-editor-async-shell-command)
([remap shell-command] . with-editor-shell-command)
:hook
(shell-mode . with-editor-export-editor)
(eshell-mode . with-editor-export-editor)
(term-exec . with-editor-export-editor)
(vterm-mode . with-editor-export-editor))
(use-package emacs-everywhere (use-package emacs-everywhere
:ensure nil :ensure nil
:commands emacs-everywhere :commands emacs-everywhere