Compare commits

...

6 commits

Author SHA1 Message Date
c69e7e43d8 dev: Improve displaying parenthesis
Add two modes `highlight-parentheses` and `rainbow-delimiters` to
improve the readability when several level of parenthesis are
involved.
2024-05-27 13:59:09 +02:00
8bb1b07590 git: Move to own configuration for (ma)git
Magit is now configured together with all git related config that may
possibily come in the future.
2024-05-27 13:57:32 +02:00
0e7dd9da5f ripgrep: Move ripgrep config to its own file
The config for ripgrep now resides in its own file.
2024-05-27 13:55:23 +02:00
4e68d2b48b authinfo: Configure the default authinfo file
Configure `auth-source` to be per default `~/.authinfo.gpg`.
2024-05-27 13:50:18 +02:00
31ea69ffce backups: Do not backup files in /dev/shm
Prevent backups to happen from files in `/dev/shm`.
2024-05-27 13:49:07 +02:00
91ff02afe1 config: Fix indention by emacs auto indent
Use the indention that emacs applies when auto indenting.
2024-05-27 13:47:27 +02:00
12 changed files with 77 additions and 62 deletions

View file

@ -1,5 +1,6 @@
;; configure backups
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/"))
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/")
("/dev/shm" . "/dev/null"))
backup-by-copying t
delete-old-versions t
kept-new-versions 16

View file

@ -82,3 +82,7 @@
;; configure theme
(custom-set-variables
'(custom-enabled-themes (quote (tango-dark))))
;; configur authinfo file
(setq auth-sources
'((:source "~/.authinfo.gpg")))

View file

@ -1,38 +1,24 @@
;; magit
(use-package magit
:ensure t
:init
;; (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
(defun vcsh (repo)
"Invoke magit on a vcsh repo. This requires an appropriate entry in `tramp-methods'."
(interactive (let ((repos (delq nil
(mapcar #'(lambda (name)
(if (string-match ".git$" name)
(substring name 0 -4)
nil))
(directory-files "~/.config/vcsh/repo.d")))))
(list (completing-read "Repository: " repos nil t))))
(magit-status-internal (format "/vcsh:%s:" repo)))
:config
;; Turn on flyspell when writing commit messages
(add-hook 'git-commit-setup-hook 'git-commit-turn-on-flyspell))
;; use ripgrep in emacs
(use-package deadgrep
:ensure t
:bind ("M-s d" . deadgrep))
;; paredit
(use-package paredit
:ensure t
:config
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'scheme-mode-hook #'enable-paredit-mode))
:ensure t
:config
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'scheme-mode-hook #'enable-paredit-mode))
(use-package highlight-parentheses
:ensure t
:config
(global-highlight-parentheses-mode t))
(use-package rainbow-delimiters
:ensure t
:config
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
;; Hack to show only files known to git inside dired; needs the
;; `git-find' shell script shim (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
@ -53,6 +39,6 @@
;; language server
(use-package lsp-mode
:ensure t
:config
(add-hook 'rust-mode-hook 'lsp-deferred))
:ensure t
:config
(add-hook 'rust-mode-hook 'lsp-deferred))

18
.emacs.d/config/git.el Normal file
View file

@ -0,0 +1,18 @@
;; magit
(use-package magit
:ensure t
:init
;; (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
(defun vcsh (repo)
"Invoke magit on a vcsh repo. This requires an appropriate entry in `tramp-methods'."
(interactive (let ((repos (delq nil
(mapcar #'(lambda (name)
(if (string-match ".git$" name)
(substring name 0 -4)
nil))
(directory-files "~/.config/vcsh/repo.d")))))
(list (completing-read "Repository: " repos nil t))))
(magit-status-internal (format "/vcsh:%s:" repo)))
:config
;; Turn on flyspell when writing commit messages
(add-hook 'git-commit-setup-hook 'git-commit-turn-on-flyspell))

View file

@ -1,3 +1,3 @@
(use-package pinentry
:init
(setq epa-pinentry-mode 'loopback))
:init
(setq epa-pinentry-mode 'loopback))

View file

@ -1,5 +1,5 @@
(use-package org
:ensure t
:init (setq org-export-backends '(ascii html icalendar latex odt beamer)))
:ensure t
:init (setq org-export-backends '(ascii html icalendar latex odt beamer)))
(setq org-directory "~/org")

View file

@ -1,8 +1,8 @@
(use-package ivy-pass
:ensure t
:init
;; from https://github.com/ecraven/ivy-pass/blob/master/ivy-pass.el
(setq password-store-password-length 32))
:ensure t
:init
;; from https://github.com/ecraven/ivy-pass/blob/master/ivy-pass.el
(setq password-store-password-length 32))
;; configure ivy-pass key binding
(global-set-key [?\C-x ?p] 'ivy-pass)

View file

@ -0,0 +1,4 @@
;; use ripgrep in emacs
(use-package deadgrep
:ensure t
:bind ("M-s d" . deadgrep))

View file

@ -1,13 +1,13 @@
(use-package cargo
:ensure t
:config
;; enable cargo keybindings
(add-hook 'rust-mode-hook 'cargo-minor-mode))
:ensure t
:config
;; enable cargo keybindings
(add-hook 'rust-mode-hook 'cargo-minor-mode))
(use-package rust-mode
:ensure t
:config
;; format code when saving
(setq rust-format-on-save t))
:ensure t
:config
;; format code when saving
(setq rust-format-on-save t))
(use-package flycheck-rust :ensure t)

View file

@ -1,9 +1,9 @@
(use-package tramp
:config
(setq tramp-default-method "ssh")
(add-to-list 'tramp-methods '("vcsh"
(tramp-login-program "vcsh")
(tramp-login-args (("enter")
("%h")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c")))))
:config
(setq tramp-default-method "ssh")
(add-to-list 'tramp-methods '("vcsh"
(tramp-login-program "vcsh")
(tramp-login-args (("enter")
("%h")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c")))))

View file

@ -57,7 +57,7 @@ symbols, which are converted to strings, and suffixed with \".el\"."
:group 'config-snippets
:type '(repeat directory))
(setq config-snippets '(base backups c calendar dev functions gpg org pass rust wl yaml))
(setq config-snippets '(base backups c calendar dev functions git gpg org pass ripgrep rust wl yaml))
(message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path)
(dolist (snippet config-snippets)

View file

@ -5,9 +5,11 @@
!/.emacs.d/config/c.el
!/.emacs.d/config/dev.el
!/.emacs.d/config/functions.el
!/.emacs.d/config/git.el
!/.emacs.d/config/gpg.el
!/.emacs.d/config/org.el
!/.emacs.d/config/pass.el
!/.emacs.d/config/ripgrep.el
!/.emacs.d/config/rust.el
!/.emacs.d/config/tramp.el
!/.emacs.d/config/yaml.el