tweaks to templates
This commit is contained in:
		
							parent
							
								
									258a70e5ae
								
							
						
					
					
						commit
						f54ea8f1b7
					
				
					 3 changed files with 81 additions and 9 deletions
				
			
		
							
								
								
									
										50
									
								
								README.org
									
										
									
									
									
								
							
							
						
						
									
										50
									
								
								README.org
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3028,13 +3028,15 @@ Tempel is another templating system. Also perhaps even more powerful with it's e
 | 
			
		|||
    (setq-local completion-at-point-functions
 | 
			
		||||
                (cons #'tempel-complete
 | 
			
		||||
                      completion-at-point-functions)))
 | 
			
		||||
  (setq tempel-path "/home/chris/.emacs.d/templates")
 | 
			
		||||
 | 
			
		||||
  (add-hook 'conf-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'prog-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'text-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'org-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'ledger-mode-hook 'tempel-setup-capf)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  (setq tempel-path "/home/chris/.emacs.d/templates")
 | 
			
		||||
 | 
			
		||||
  ;; Optionally make the Tempel templates available to Abbrev,
 | 
			
		||||
  ;; either locally or globally. `expand-abbrev' is bound to C-x '.
 | 
			
		||||
| 
						 | 
				
			
			@ -3190,6 +3192,10 @@ Ace link provides an avy like search for links. Upon using the keybindings prese
 | 
			
		|||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . left)
 | 
			
		||||
             (window-width . 0.3))
 | 
			
		||||
            ("*Denote FILE backlinks.**"
 | 
			
		||||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . right)
 | 
			
		||||
             (window-width . 0.3))
 | 
			
		||||
            ("*org-roam*"
 | 
			
		||||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . right)
 | 
			
		||||
| 
						 | 
				
			
			@ -3582,7 +3588,7 @@ I'd like to start learning and using rust if I can.
 | 
			
		|||
        rustic-lsp-client 'eglot
 | 
			
		||||
        rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used"
 | 
			
		||||
        rustic-rustfmt-args ""
 | 
			
		||||
        rustic-test-arguments "-- --nocapture")
 | 
			
		||||
        rustic-test-arguments "--benches --tests --all-features -- --nocapture")
 | 
			
		||||
  (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
 | 
			
		||||
  (add-to-list 'compilation-error-regexp-alist rustic-compilation-error)
 | 
			
		||||
  (add-to-list 'compilation-error-regexp-alist rustic-compilation-warning)
 | 
			
		||||
| 
						 | 
				
			
			@ -3591,7 +3597,7 @@ I'd like to start learning and using rust if I can.
 | 
			
		|||
    "!" 'rustic-run-shell-command
 | 
			
		||||
    "gC" 'rustic-cargo-clippy
 | 
			
		||||
    "gA" 'rustic-cargo-add
 | 
			
		||||
    "gt" 'rustic-cargo-test
 | 
			
		||||
    "gt" 'rustic-cargo-test-dwim
 | 
			
		||||
    "gT" 'rustic-cargo-current-test)
 | 
			
		||||
  (chris/leader-keys 'normal rustic-mode-map
 | 
			
		||||
    "gc" 'rustic-compile
 | 
			
		||||
| 
						 | 
				
			
			@ -3621,6 +3627,11 @@ I'd like to start learning and using rust if I can.
 | 
			
		|||
    "gt" 'rustic-cargo-test))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(use-package ron-mode
 | 
			
		||||
  :mode "\\.ron\\'")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** Web
 | 
			
		||||
For developing websites, I like to use web-mode
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
| 
						 | 
				
			
			@ -4202,7 +4213,9 @@ Ledger mode
 | 
			
		|||
    "gr" 'ledger-report
 | 
			
		||||
    "gp" 'ledger-toggle-current
 | 
			
		||||
    "C-j" 'ledger-navigate-next-xact-or-directive
 | 
			
		||||
    "C-k" 'ledger-navigate-prev-xact-or-directive))
 | 
			
		||||
    "C-k" 'ledger-navigate-prev-xact-or-directive
 | 
			
		||||
    "S-k" 'ledger-date-up
 | 
			
		||||
    "S-j" 'ledger-date-down))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** MU4E
 | 
			
		||||
| 
						 | 
				
			
			@ -4528,6 +4541,35 @@ Use magit, because why wouldn't you? duh!
 | 
			
		|||
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** Forgejo
 | 
			
		||||
Using forgejo interaction as well as magit for some repos
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(add-to-list 'load-path (file-truename (concat user-emacs-directory "fj/")))
 | 
			
		||||
(use-package fj
 | 
			
		||||
  :custom
 | 
			
		||||
  (fj-host "https://git.tfcconnection.org")
 | 
			
		||||
  (fj-user "chris")
 | 
			
		||||
  (fj-token "b170996c9d2989d749fdb3702385e84f7d2ae8fc")
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'override
 | 
			
		||||
    "ri" 'fj-list-issues
 | 
			
		||||
    "rp" 'fj-list-own-repos)
 | 
			
		||||
  (general-def 'normal fj-issue-tl-mode-map
 | 
			
		||||
    "c" 'fj-issue-compose))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'override
 | 
			
		||||
    "oe" 'chris/eshell-new
 | 
			
		||||
    "oE" 'chris/eshell-current-window
 | 
			
		||||
    "be" 'eshell)
 | 
			
		||||
  (general-def '(normal insert) eshell-mode-map
 | 
			
		||||
    "C-d" 'kill-buffer-and-window
 | 
			
		||||
    "C-l" 'eshell/clear
 | 
			
		||||
    "<up>" 'eshell-previous-input))
 | 
			
		||||
** Eshell
 | 
			
		||||
Let's add our own eshell prompt. and set the password cache to a significantly higher time in order to not need to constantly reuse my password.
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										34
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										34
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2164,13 +2164,15 @@ targets."
 | 
			
		|||
    (setq-local completion-at-point-functions
 | 
			
		||||
                (cons #'tempel-complete
 | 
			
		||||
                      completion-at-point-functions)))
 | 
			
		||||
  (setq tempel-path "/home/chris/.emacs.d/templates")
 | 
			
		||||
 | 
			
		||||
  (add-hook 'conf-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'prog-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'text-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'org-mode-hook 'tempel-setup-capf)
 | 
			
		||||
  (add-hook 'ledger-mode-hook 'tempel-setup-capf)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  (setq tempel-path "/home/chris/.emacs.d/templates")
 | 
			
		||||
 | 
			
		||||
  ;; Optionally make the Tempel templates available to Abbrev,
 | 
			
		||||
  ;; either locally or globally. `expand-abbrev' is bound to C-x '.
 | 
			
		||||
| 
						 | 
				
			
			@ -2294,6 +2296,10 @@ targets."
 | 
			
		|||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . left)
 | 
			
		||||
             (window-width . 0.3))
 | 
			
		||||
            ("*Denote FILE backlinks.**"
 | 
			
		||||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . right)
 | 
			
		||||
             (window-width . 0.3))
 | 
			
		||||
            ("*org-roam*"
 | 
			
		||||
             (display-buffer-in-side-window)
 | 
			
		||||
             (side . right)
 | 
			
		||||
| 
						 | 
				
			
			@ -2619,7 +2625,7 @@ targets."
 | 
			
		|||
        rustic-lsp-client 'eglot
 | 
			
		||||
        rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used"
 | 
			
		||||
        rustic-rustfmt-args ""
 | 
			
		||||
        rustic-test-arguments "-- --nocapture")
 | 
			
		||||
        rustic-test-arguments "--benches --tests --all-features -- --nocapture")
 | 
			
		||||
  (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
 | 
			
		||||
  (add-to-list 'compilation-error-regexp-alist rustic-compilation-error)
 | 
			
		||||
  (add-to-list 'compilation-error-regexp-alist rustic-compilation-warning)
 | 
			
		||||
| 
						 | 
				
			
			@ -2628,7 +2634,7 @@ targets."
 | 
			
		|||
    "!" 'rustic-run-shell-command
 | 
			
		||||
    "gC" 'rustic-cargo-clippy
 | 
			
		||||
    "gA" 'rustic-cargo-add
 | 
			
		||||
    "gt" 'rustic-cargo-test
 | 
			
		||||
    "gt" 'rustic-cargo-test-dwim
 | 
			
		||||
    "gT" 'rustic-cargo-current-test)
 | 
			
		||||
  (chris/leader-keys 'normal rustic-mode-map
 | 
			
		||||
    "gc" 'rustic-compile
 | 
			
		||||
| 
						 | 
				
			
			@ -2655,6 +2661,9 @@ targets."
 | 
			
		|||
    "gC" 'rustic-cargo-clippy
 | 
			
		||||
    "gt" 'rustic-cargo-test))
 | 
			
		||||
 | 
			
		||||
(use-package ron-mode
 | 
			
		||||
  :mode "\\.ron\\'")
 | 
			
		||||
 | 
			
		||||
(defun chris/web-mode-setup ()
 | 
			
		||||
  "some setup for web development"
 | 
			
		||||
  (setq-local completion-at-point-functions
 | 
			
		||||
| 
						 | 
				
			
			@ -2988,7 +2997,9 @@ targets."
 | 
			
		|||
    "gr" 'ledger-report
 | 
			
		||||
    "gp" 'ledger-toggle-current
 | 
			
		||||
    "C-j" 'ledger-navigate-next-xact-or-directive
 | 
			
		||||
    "C-k" 'ledger-navigate-prev-xact-or-directive))
 | 
			
		||||
    "C-k" 'ledger-navigate-prev-xact-or-directive
 | 
			
		||||
    "S-k" 'ledger-date-up
 | 
			
		||||
    "S-j" 'ledger-date-down))
 | 
			
		||||
 | 
			
		||||
(use-package mu4e
 | 
			
		||||
  ;; :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/"
 | 
			
		||||
| 
						 | 
				
			
			@ -3253,6 +3264,21 @@ targets."
 | 
			
		|||
  :custom
 | 
			
		||||
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
 | 
			
		||||
 | 
			
		||||
(add-to-list 'load-path (file-truename (concat user-emacs-directory "fj/")))
 | 
			
		||||
(use-package fj
 | 
			
		||||
  :custom
 | 
			
		||||
  (fj-host "https://git.tfcconnection.org")
 | 
			
		||||
  (fj-user "chris")
 | 
			
		||||
  (fj-token "b170996c9d2989d749fdb3702385e84f7d2ae8fc")
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'override
 | 
			
		||||
    "ri" 'fj-list-issues
 | 
			
		||||
    "rp" 'fj-list-own-repos)
 | 
			
		||||
  (general-def 'normal fj-issue-tl-mode-map
 | 
			
		||||
    "c" 'fj-issue-compose))
 | 
			
		||||
 | 
			
		||||
(use-package eshell
 | 
			
		||||
  :ensure t
 | 
			
		||||
  :config
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -184,7 +184,11 @@ nix-mode
 | 
			
		|||
 | 
			
		||||
ledger-mode
 | 
			
		||||
 | 
			
		||||
(contribution "2023-10-01 Contributions" n> "Income:Supporters:" (p "supporter") > n> "Assets:Core")
 | 
			
		||||
(cont (p (format-time-string "%Y-%m-%d")) p n> "    Income:Supporters" (p "account") > n> "    Assets:Core")
 | 
			
		||||
 | 
			
		||||
(coll (p (org-read-date)) " " (p "account" account) n> "Collection:" (s account) "              " (p "amount") n> "Assets:" (s account) n>)
 | 
			
		||||
 | 
			
		||||
(churchpay (p (org-read-date)) " " (p "account" account) n> "Assets:" (s account) "              " (p "amount") n> "Liabilities:" (s account) n>)
 | 
			
		||||
 | 
			
		||||
rustic-mode rust-mode rust-ts-mode
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue