diff --git a/.gitignore b/.gitignore index 0d192e1..16271d5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ !/themes !/init !/lisp -!/dir-locals \ No newline at end of file +!/packages +!/dir-locals diff --git a/packages/conf-mode.el b/packages/conf-mode.el new file mode 100644 index 0000000..304f72a --- /dev/null +++ b/packages/conf-mode.el @@ -0,0 +1,9 @@ +(use-package conf-mode + :hook + (prog-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . electric-pair-mode) + (prog-mode . electric-indent-mode) + (prog-mode . (lambda () + (when (featurep 'highlight-indentation) + (highlight-indentation-mode 1))))) diff --git a/packages/ediff.el b/packages/ediff.el new file mode 100644 index 0000000..88f1eb1 --- /dev/null +++ b/packages/ediff.el @@ -0,0 +1,4 @@ +(use-package ediff + :custom + (ediff-split-window-function 'split-window-horizontally) + (ediff-window-setup-function 'ediff-setup-windows-plain)) diff --git a/packages/eglot.el b/packages/eglot.el new file mode 100644 index 0000000..dc72df2 --- /dev/null +++ b/packages/eglot.el @@ -0,0 +1,3 @@ +(use-package eglot + :if (locate-library "eglot") + :custom (eglot-autoshutdown t)) diff --git a/packages/flycheck.el b/packages/flycheck.el new file mode 100644 index 0000000..eb45a3f --- /dev/null +++ b/packages/flycheck.el @@ -0,0 +1,3 @@ +(use-package flycheck + :hook + (flycheck-error-list-mode . visual-line-mode)) diff --git a/packages/flymake.el b/packages/flymake.el new file mode 100644 index 0000000..2639770 --- /dev/null +++ b/packages/flymake.el @@ -0,0 +1,3 @@ +(use-package flymake + :hook + (flymake-diagnostics-buffer-mode . visual-line-mode)) diff --git a/packages/highlight-indentation.el b/packages/highlight-indentation.el new file mode 100644 index 0000000..499f6e9 --- /dev/null +++ b/packages/highlight-indentation.el @@ -0,0 +1,2 @@ +(use-package highlight-indentation + :if (locate-library "highlight-indentation")) diff --git a/packages/ibuffer.el b/packages/ibuffer.el new file mode 100644 index 0000000..d5d4cd9 --- /dev/null +++ b/packages/ibuffer.el @@ -0,0 +1,10 @@ +(use-package ibuffer + :custom + (ibuffer-display-summary nil) + (ibuffer-expert t) + (ibuffer-formats '((mark modified read-only locked + " " (name 32 32 :left :elide) + " " (size 5 5 :right) + " " (mode 16 16 :left :elide) + " " filename-and-process) + (mark " " (name 16 -1) " " filename)))) diff --git a/packages/ielm.el b/packages/ielm.el new file mode 100644 index 0000000..fce4ddd --- /dev/null +++ b/packages/ielm.el @@ -0,0 +1,3 @@ +(use-package ielm + :hook + (ielm-mode . visual-line-mode)) diff --git a/packages/magit.el b/packages/magit.el new file mode 100644 index 0000000..1b052ae --- /dev/null +++ b/packages/magit.el @@ -0,0 +1,3 @@ +(use-package magit + :commands magit + :custom (magit-inhibit-libgit t)) diff --git a/packages/man.el b/packages/man.el new file mode 100644 index 0000000..68c2766 --- /dev/null +++ b/packages/man.el @@ -0,0 +1,3 @@ +(use-package man + :custom + (Man-notify-method 'pushy)) diff --git a/packages/pixel-scroll.el b/packages/pixel-scroll.el new file mode 100644 index 0000000..a682571 --- /dev/null +++ b/packages/pixel-scroll.el @@ -0,0 +1,8 @@ +(use-package pixel-scroll + :if (and (locate-library "pixel-scroll") + (display-graphic-p)) + :custom + (pixel-dead-time 0) + (pixel-wait 0) + (pixel-resolution-fine-flag 10)) + diff --git a/packages/prog-mode.el b/packages/prog-mode.el new file mode 100644 index 0000000..3da5cfd --- /dev/null +++ b/packages/prog-mode.el @@ -0,0 +1,9 @@ +(use-package prog-mode + :hook + (prog-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . electric-pair-mode) + (prog-mode . electric-indent-mode) + (prog-mode . (lambda () + (when (featurep 'highlight-indentation) + (highlight-indentation-mode 1))))) diff --git a/packages/savehist.el b/packages/savehist.el new file mode 100644 index 0000000..c9a5e45 --- /dev/null +++ b/packages/savehist.el @@ -0,0 +1,4 @@ +(use-package savehist + :custom + (savehist-file (file-name-concat user-emacs-directory "savehist")) + (savehist-save-minibuffer-history t)) diff --git a/packages/text-mode.el b/packages/text-mode.el new file mode 100644 index 0000000..b281d95 --- /dev/null +++ b/packages/text-mode.el @@ -0,0 +1,4 @@ +(use-package text-mode + :hook + (text-mode . display-line-numbers-mode) + (text-mode . visual-line-mode)) diff --git a/packages/tramp.el b/packages/tramp.el new file mode 100644 index 0000000..d5536af --- /dev/null +++ b/packages/tramp.el @@ -0,0 +1,8 @@ +(use-package tramp + :custom + (tramp-password-cache nil) + (tramp-persistency-file-name nil) + :config + (add-to-list 'tramp-connection-properties + (list (regexp-quote (format "/sudo:root@%s:" system-name)) + "session-timeout" (* 60 20)))) diff --git a/packages/treesit.el b/packages/treesit.el new file mode 100644 index 0000000..00c383b --- /dev/null +++ b/packages/treesit.el @@ -0,0 +1,21 @@ +(use-package treesit + :if (>= emacs-major-version 29)) + +(use-package rust-ts-mode + :requires treesit + :mode (rx (literal ".") "rs" eos) + :hook (rust-ts-mode . (lambda () + (when (featurep 'rust-mode) + (add-hook before-save-hook rust-before-save-method) + (add-hook after-save-hook rust-after-save-method) + (use-local-map (make-composed-keymap (list rust-ts-mode-map rust-mode-map))))))) + +(use-package python-ts-mode + :requires treesit + :mode (rx (literal ".") "py" eos) + :interpreter ("python" "python3" "python2")) + +(use-package bash-ts-mode + :requires treesit + :mode (rx (literal ".") "sh" eos) + :interpreter ("bash" "sh" "openrc-run"))