From d2554d69fe3d509c69c1d773e31e56b867cc65af Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:45:07 +0200 Subject: Emacs: completion-styles --- dot.emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 87e338b..949b5b8 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -151,7 +151,8 @@ helm-buffers-fuzzy-matching t helm-recentf-fuzzy-match t helm-ff-file-name-history-use-recentf t - helm-echo-input-in-header-line t)) + helm-echo-input-in-header-line t + completion-styles '(flex))) (use-package helm-rg :after helm) -- cgit v1.2.3 From 73d76d0e994aaa78d61c6170fd7180d3416ad2fa Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:46:14 +0200 Subject: Emacs: Use k8s-mode --- dot.emacs.d/init.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 949b5b8..e20f363 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -200,6 +200,9 @@ (highlight-indentation-mode)))) (use-package dockerfile-mode) +(use-package k8s-mode + :hook (k8s-mode . yas-minor-mode)) + (defun qsx-dont-show-line-numbers-hook () (setq display-line-numbers nil)) -- cgit v1.2.3 From 482106566db3cfdc94e87552ddbe2042a86ac5a9 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:46:35 +0200 Subject: Emacs: Use dockerfile-mode with Containerfiles --- dot.emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index e20f363..e9896fd 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -199,10 +199,11 @@ (defun qsx-hl-indent-mode-hook () (highlight-indentation-mode)))) -(use-package dockerfile-mode) (use-package k8s-mode :hook (k8s-mode . yas-minor-mode)) +(use-package dockerfile-mode + :mode "/Containerfile\\(?:\\.[^/\\]*\\)?\\'") (defun qsx-dont-show-line-numbers-hook () (setq display-line-numbers nil)) -- cgit v1.2.3 From 3e1fda8babc53b4dafbf7c64d0b047949ca1ce48 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:47:51 +0200 Subject: Emacs: llvm-mode and llvm.org C style --- dot.emacs.d/init.el | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index e9896fd..3c1b21d 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -276,6 +276,31 @@ (setq c-default-style "linux") +;; Taken from LLVM source tree +;; https://github.com/llvm/llvm-project/blob/c719a8596d01cef9b54f0585bd2d68d657d8659a/llvm/utils/emacs/emacs.el +(defun llvm-lineup-statement (langelem) + (let ((in-assign (c-lineup-assignments langelem))) + (if (not in-assign) + '++ + (aset in-assign 0 + (+ (aref in-assign 0) + (* 2 c-basic-offset))) + in-assign))) + +;; Add a cc-mode style for editing LLVM C and C++ code +(c-add-style "llvm.org" + '("gnu" + (fill-column . 80) + (c++-indent-level . 2) + (c-basic-offset . 2) + (indent-tabs-mode . nil) + (c-offsets-alist . ((arglist-intro . ++) + (innamespace . 0) + (member-init-intro . ++) + (statement-cont . llvm-lineup-statement))))) +;; End LLVM block +(require 'llvm-mode) + (setq tramp-default-method "ssh" tramp-terminal-type "tramp") -- cgit v1.2.3 From d26912ac5cdc6710f3f599c44f4578a44bffea72 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:48:42 +0200 Subject: Emacs: calc: pgtk input fix --- dot.emacs.d/init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 3c1b21d..cad5d37 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -336,7 +336,12 @@ ;; Use keypad comma as decimal separator (use-package calc :config - (define-key calc-digit-map (kbd "") ".")) + (define-key calc-digit-map (kbd "") ".") + + ;; Necessary for calc-digit-map kp-separator shenanigans below + ;; cf. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56117 + (if (eq window-system 'pgtk) + (pgtk-use-im-context nil))) ;;; Mail (use-package gnus -- cgit v1.2.3 From 8956fab75f64598186e8bdec5fcfdd73c071a5f3 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:49:09 +0200 Subject: Emacs: Gnus: Improve user-date-format --- dot.emacs.d/init.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index cad5d37..56945a0 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -356,11 +356,12 @@ message-confirm-send t mail-user-agent 'gnus-user-agent read-mail-command 'gnus - gnus-gcc-mark-as-read t - gnus-user-date-format-alist `((,(gnus-seconds-today) . " T%H:%M:%S") - (,(gnus-seconds-month) . " %dT%H:%M:%S") - (,(gnus-seconds-year) . " %m-%dT%H:%M:%S") - (t . "%Y-%m-%dT%H:%M:%S")) + gnus-gcc-mark-as-read t) + (setq gnus-user-date-format-alist '(((gnus-seconds-today) . " %H:%M:%S") + ((gnus-seconds-month) . "%a %e %H:%M:%S") + ((gnus-seconds-year) . "%a %m-%d %H:%M:%S") + (t . "%a %Y-%m-%d %H:%M:%S"))) + (setq gnus-summary-line-format "%U%R %&user-date; %(%[%5k: %-23,23f%]%)%B%s\n" gnus-sum-thread-tree-single-indent " " gnus-sorted-header-list '("^From:" "^Organization:" "^Sender:" "^To:" "^Newsgroups:" "^.?Cc:" "^Subject:" "^Date:" "^Resent-.*:" "^Reply-To:" "^Followup-To:" "^X-Clacks-Overhead:" "Openpgp:" "^Authentication-Results:" "^Message-ID:") -- cgit v1.2.3 From 4b64743fcf65031dad4d1056dd44528caff01251 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:50:13 +0200 Subject: zsh: Add ~/.krew/bin to $PATH --- dot.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/dot.zshenv b/dot.zshenv index 725398b..a9a35b1 100644 --- a/dot.zshenv +++ b/dot.zshenv @@ -10,6 +10,7 @@ path=( ~/.gem/ruby/*/bin(/N) ~/.cabal/bin(/N) $GOPATH/bin(/N) + ${KREW_ROOT:-$HOME/.krew}/bin ~/.cargo/bin(/N) ~/.poetry/bin(/N) ~/.local/bin(/N) -- cgit v1.2.3 From 3e76b9d60bff69802608d323b4000910602779bb Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:50:51 +0200 Subject: zsh: Set $MPD_HOST to local socket --- dot.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/dot.zshenv b/dot.zshenv index a9a35b1..be7a69a 100644 --- a/dot.zshenv +++ b/dot.zshenv @@ -27,4 +27,5 @@ manpath=( typeset -xU path manpath [ -S ~/.gnupg/S.gpg-agent.ssh ] && export SSH_AUTH_SOCK=~/.gnupg/S.gpg-agent.ssh [ -S /run/user/$EUID/gnupg/S.gpg-agent.ssh ] && export SSH_AUTH_SOCK=/run/user/$EUID/gnupg/S.gpg-agent.ssh +[ -S $XDG_RUNTIME_DIR/mpd/socket ] && export MPD_HOST=$XDG_RUNTIME_DIR/mpd/socket (( $+commands[rbenv] )) && eval "$(rbenv init -)" -- cgit v1.2.3 From 814a35d77d0bcd4cc3d8d577bb11cc1cc5519a37 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 11 Sep 2024 21:51:55 +0200 Subject: Git: Some aliases and options --- dot.gitconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dot.gitconfig b/dot.gitconfig index 91c162d..82b0e9e 100644 --- a/dot.gitconfig +++ b/dot.gitconfig @@ -10,6 +10,8 @@ lol = log --oneline --graph --decorate --all colorlog = log --date=relative --format=\"%Cblue%h%Creset %C(yellow)%an%Creset %Cgreen%ad%Creset%C(auto)%d%Creset %s\" --topo-order push-all = !git remote | xargs -L1 git push + praise = blame + rofl = log --all --graph --format='%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ad%Creset %C(red bold)%d%Creset%s' --date=relative --abbrev-commit --decorate [push] default = simple [instaweb] @@ -23,3 +25,10 @@ bcc = fcc-sent@qsuscs.de [init] defaultBranch = main +[core] + quotePath = false + commitGraph = true +[receive] + advertisePushOptions = true +[gc] + writeCommitGraph = true -- cgit v1.2.3