Parinfer time

This commit is contained in:
Daniel Ziltener 2023-11-17 03:22:38 +01:00
parent 64ae50d419
commit 9db349a29c
Signed by: zilti
GPG key ID: B38976E82C9DAE42
3 changed files with 117 additions and 107 deletions

View file

@ -42,8 +42,6 @@
git-gutter git-gutter
goto-chg goto-chg
keychain-environment keychain-environment
lispy
lispyville
lsp-scheme lsp-scheme
magit magit
magit-todos magit-todos
@ -59,9 +57,11 @@
org-rainbow-tags org-rainbow-tags
org-roam org-roam
org-roam-ui org-roam-ui
parinfer-rust-mode
pass pass
password-store password-store
password-store-otp password-store-otp
plan9-theme
rainbow-delimiters rainbow-delimiters
tempel tempel
tree-sitter tree-sitter

View file

@ -62,6 +62,7 @@
(minibuffer-prompt-properties (minibuffer-prompt-properties
(read-only t cursor-intangible t face minibuffer-prompt)) (read-only t cursor-intangible t face minibuffer-prompt))
(tab-always-indent 'complete) (tab-always-indent 'complete)
(indent-tabs-mode nil)
(enable-recursive-minibuffers t) (enable-recursive-minibuffers t)
(enable-remote-dir-locals t) (enable-remote-dir-locals t)
(global-hl-line-mode t) (global-hl-line-mode t)
@ -123,7 +124,7 @@
(catppuccin-italic-comments t) (catppuccin-italic-comments t)
:custom-face :custom-face
(font-lock-doc-face ((t (:inherit font-lock-comment-face (font-lock-doc-face ((t (:inherit font-lock-comment-face
:foreground "#fab387")))) :foreground "#fab387"))))
:config :config
(load-theme 'catppuccin)) (load-theme 'catppuccin))
@ -152,8 +153,8 @@
(evil-mode 1) (evil-mode 1)
:bind :bind
(:map evil-normal-state-map (:map evil-normal-state-map
("<leader>f" . 'find-file) ("<leader>f" . 'find-file)
("<leader>k" . 'kill-buffer))) ("<leader>k" . 'kill-buffer)))
(use-package evil-collection (use-package evil-collection
:after evil :after evil
@ -175,20 +176,21 @@
:config :config
(with-eval-after-load 'eglot (with-eval-after-load 'eglot
(setq completion-category-defaults nil)) (setq completion-category-defaults nil))
(setq completion-styles '(orderless basic) (setq completion-styles
completion-category-defaults nil '(orderless basic)
completion-category-overrides '((file (styles partial-completion))))) completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
(use-package consult (use-package consult
:bind :bind
(:map evil-normal-state-map (:map evil-normal-state-map
("<leader><SPC>" . 'consult-find) ("<leader><SPC>" . 'consult-find)
("<leader>gs" . 'consult-eglot-symbols) ("<leader>gs" . 'consult-eglot-symbols)
("<leader>b" . 'consult-buffer) ("<leader>b" . 'consult-buffer)
("<leader>gb" . 'consult-project-buffer) ("<leader>gb" . 'consult-project-buffer)
("<leader>g/" . 'consult-git-grep) ("<leader>g/" . 'consult-git-grep)
("<leader>/" . 'consult-grep) ("<leader>/" . 'consult-grep)
("/" . 'consult-line))) ("/" . 'consult-line)))
(use-package embark (use-package embark
:bind :bind
@ -291,51 +293,62 @@
(use-package goto-chg (use-package goto-chg
:bind :bind
(:map evil-normal-state-map (:map evil-normal-state-map
("g," . 'goto-last-change) ("g," . 'goto-last-change)
("g;" . 'goto-last-change-reverse))) ("g;" . 'goto-last-change-reverse)))
;;;; Lisp Navigation and Editing ;;;; Lisp Navigation and Editing
;;;;; Basic ;;;;; Basic
(use-package lispy (use-package parinfer-rust-mode
:custom :custom
(lispy-close-quotes-at-end-p t) (parinfer-rust-auto-download t)
(lispy-compat '("cider" "edebug" "magit-blame-mode"))
(lispy-visit-method #'consult-find)
(lispy-occur-backend #'consult-line)
:hook :hook
emacs-lisp-mode emacs-lisp-mode
clojure-ts-mode
scheme-mode scheme-mode
(parinfer-rust-mode . electric-pair-local-mode)
:config :config
(evil-define-key 'insert 'prog-mode-map (evil-define-key 'normal 'parinfer-rust-mode-map
"(" #'lispy-parens (kbd "r") #'raise-sexp))
"{" #'lispy-braces ;; (use-package lispy
"}" #'lispy-brackets ;; :custom
")" #'lispy-right-nostring ;; (lispy-close-quotes-at-end-p t)
"\"" #'lispy-quotes ;; (lispy-compat '("cider" "edebug" "magit-blame-mode"))
(kbd "<DEL>") #'lispy-delete-backward ;; (lispy-visit-method #'consult-find)
">" #'special-lispy-slurp ;; (lispy-occur-backend #'consult-line)
"<" #'special-lispy-barf ;; :hook
"c" #'special-lispy-clone ;; emacs-lisp-mode
"q" #'special-lispy-ace-paren ;; scheme-mode
"w" #'special-lispy-move-up ;; :config
"s" #'special-lispy-move-down ;; (evil-define-key 'insert 'clojure-ts-mode-map
"r" #'special-lispy-raise ;; "(" #'lispy-parens
"e" #'special-lispy-eval)) ;; "{" #'lispy-braces
;; "}" #'lispy-brackets
;; ")" #'lispy-right-nostring
;; "\"" #'lispy-quotes
;; (kbd "<DEL>") #'lispy-delete-backward
;; ">" #'special-lispy-slurp
;; "<" #'special-lispy-barf
;; "c" #'special-lispy-clone
;; "q" #'special-lispy-ace-paren
;; "w" #'special-lispy-move-up
;; "s" #'special-lispy-move-down
;; "r" #'special-lispy-raise
;; "e" #'special-lispy-eval))
(use-package lispyville ;; (use-package lispyville
:bind ;; :bind
(:map evil-normal-state-map ;; (:map evil-normal-state-map
("<leader>," . 'lispyville-comment-or-uncomment) ;; ("<leader>," . 'lispyville-comment-or-uncomment)
("<leader>." . 'lispyville-comment-and-clone-dwim) ;; ("<leader>." . 'lispyville-comment-and-clone-dwim)
("<leader>ci" . 'lispyville-comment-or-uncomment-line)) ;; ("<leader>ci" . 'lispyville-comment-or-uncomment-line))
:hook ;; :hook
(lispy-mode . lispyville-mode)) ;; (lispy-mode . lispyville-mode))
;;;;; Visual Aid ;;;;; Visual Aid
(use-package rainbow-delimiters ;; (use-package rainbow-delimiters
:hook ;; :hook
emacs-lisp-mode ;; emacs-lisp-mode
scheme-mode) ;; scheme-mode)
;;;; Programming ;;;; Programming
(use-package editorconfig (use-package editorconfig
@ -351,12 +364,12 @@
(defun my/eglot-capf () (defun my/eglot-capf ()
(setq-local completion-at-point-functions (setq-local completion-at-point-functions
(list (cape-super-capf (list (cape-super-capf
#'eglot-completion-at-point #'eglot-completion-at-point
#'tempel-complete #'tempel-complete
#'cape-dabbrev #'cape-dabbrev
#'cape-file #'cape-file
#'cape-dict)))) #'cape-dict))))
(use-package eglot (use-package eglot
:custom :custom
@ -368,34 +381,34 @@
(eglot-inlay-hints-mode +1) (eglot-inlay-hints-mode +1)
(my/eglot-capf)) (my/eglot-capf))
(setq-default eglot-workspace-configuration (setq-default eglot-workspace-configuration
'((clojure-lsp (maxCompletions . 300)))) '((clojure-lsp (maxCompletions . 300))))
(add-to-list 'eglot-server-programs (add-to-list 'eglot-server-programs
'((clojure-ts-mode clojurec-ts-mode clojurescript-ts-mode) '((clojure-ts-mode clojurec-ts-mode clojurescript-ts-mode)
"clojure-lsp" "clojure-lsp"
:initializationOptions :initializationOptions
(:preferences (:preferences
(:includeInlayParameterNameHints (:includeInlayParameterNameHints
"all" "all"
:includeInlayParameterNameHintsWhenArgumentMatchesName :includeInlayParameterNameHintsWhenArgumentMatchesName
t t
:includeInlayFunctionParameterTypeHints :includeInlayFunctionParameterTypeHints
t t
:includeInlayVariableTypeHints :includeInlayVariableTypeHints
t t
:includeInlayVariableTypeHintsWhenTypeMatchesName :includeInlayVariableTypeHintsWhenTypeMatchesName
t t
:includeInlayPRopertyDeclarationTypeHints :includeInlayPRopertyDeclarationTypeHints
t t
:includeInlayFunctionLikeReturnTypeHints :includeInlayFunctionLikeReturnTypeHints
t t
:includeInlayEnumMemberValueHints :includeInlayEnumMemberValueHints
t)))) t))))
:hook :hook
(eglot-managed-mode . (lambda () (eglot-managed-mode . (lambda ()
(add-hook 'before-save-hook (add-hook 'before-save-hook
(lambda () (lambda ()
(call-interactively #'eglot-format-buffer)) (call-interactively #'eglot-format-buffer))
nil 'local))) nil 'local)))
(eglot-managed-mode . eglot-inlay-hints-mode) (eglot-managed-mode . eglot-inlay-hints-mode)
(eglot-managed-mode . #'my/eglot-capf)) (eglot-managed-mode . #'my/eglot-capf))
@ -407,36 +420,31 @@
;;;;; Clojure ;;;;; Clojure
(use-package clojure-ts-mode (use-package clojure-ts-mode
:after (tree-sitter lispy) :after tree-sitter
:config :config
(require 'sesman) (require 'sesman)
(sesman-install-menu clojure-mode-map) (sesman-install-menu clojure-mode-map)
:hook :hook
((clojure-ts-mode . lispy-mode) ((clojure-ts-mode . eglot-ensure)
(clojure-ts-mode . eglot-ensure)
(clojure-ts-mode . rainbow-delimiters-mode)
(clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
(setq-local sesman-system 'CIDER))) (setq-local sesman-system 'CIDER)))
(clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
(sesman-install-menu clojure-mode-map))) (sesman-install-menu clojure-mode-map)))
(clojurec-ts-mode . (lambda () (clojurec-ts-mode . (lambda ()
(sesman-install-menu clojurec-mode-map))) (sesman-install-menu clojurec-mode-map)))
(clojurescript-ts-mode . (lambda () (clojurescript-ts-mode . (lambda ()
(sesman-install-menu clojurescript-mode-map)))) (sesman-install-menu clojurescript-mode-map))))
:mode :mode
("\\.clj\\'" . #'clojure-ts-mode) ("\\.clj\\'" . #'clojure-ts-mode)
("\\.cljc\\'" . #'clojurec-ts-mode) ("\\.cljc\\'" . #'clojurec-ts-mode)
("\\.cljs\\'" . #'clojurescript-ts-mode) ("\\.cljs\\'" . #'clojurescript-ts-mode)
:init :init
(add-to-list 'lispy-clojure-modes 'clojure-ts-mode)
(add-to-list 'lispy-clojure-modes 'clojurec-ts-mode)
(add-to-list 'lispy-clojure-modes 'clojurescript-ts-mode)
(add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
'(clojure-ts-mode . clojure)) '(clojure-ts-mode . clojure))
(add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
'(clojurec-ts-mode . clojure)) '(clojurec-ts-mode . clojure))
(add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
'(clojurescript-ts-mode . clojure))) '(clojurescript-ts-mode . clojure)))
(use-package cider (use-package cider
:hook :hook
@ -450,7 +458,7 @@
;;;;; Chicken Scheme ;;;;; Chicken Scheme
(defun flymake-chicken-init () (defun flymake-chicken-init ()
(add-hook 'flymake-diagnostic-functions (add-hook 'flymake-diagnostic-functions
#'flymake-chicken-backend nil t) #'flymake-chicken-backend nil t)
(flymake-mode)) (flymake-mode))
(use-package geiser (use-package geiser
@ -465,7 +473,7 @@
(lsp-scheme-implementation "chicken") (lsp-scheme-implementation "chicken")
:config :config
(progn (add-to-list 'eglot-server-programs (progn (add-to-list 'eglot-server-programs
'(scheme-mode . ("chicken-lsp-server")))) '(scheme-mode . ("chicken-lsp-server"))))
(require 'lsp-scheme)) (require 'lsp-scheme))
;; (use-package flymake-chicken ;; (use-package flymake-chicken
@ -512,7 +520,7 @@
:after magit :after magit
:config :config
(advice-add 'magit :after (lambda (&rest _args) (advice-add 'magit :after (lambda (&rest _args)
(call-interactively #'forge-pull)))) (call-interactively #'forge-pull))))
(use-package code-review (use-package code-review
:after forge :after forge
@ -525,7 +533,7 @@
;;;; LaTeX ;;;; LaTeX
;; https://github.com/politza/pdf-tools/#known-problems ;; https://github.com/politza/pdf-tools/#known-problems
(add-hook 'TeX-after-compilation-finished-functions (add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer) #'TeX-revert-document-buffer)
;;;; Communication ;;;; Communication
;;;;; IRC ;;;;; IRC
@ -535,14 +543,14 @@
(circe-chat-mode . enable-circe-color-nicks) (circe-chat-mode . enable-circe-color-nicks)
:custom :custom
(circe-network-options (circe-network-options
'(("Lyrion Libera Chat" '(("Lyrion Libera Chat"
:host "lyrion.ch" :host "lyrion.ch"
:port 6697 :port 6697
:tls t :tls t
:nick "zilti" :nick "zilti"
:sasl-username "zilti/irc.libera.chat" :sasl-username "zilti/irc.libera.chat"
:sasl-password (lambda (_) :sasl-password (lambda (_)
(password-store-get "Privat/Soju")))))) (password-store-get "Privat/Soju"))))))
(provide 'init) (provide 'init)
;;; init.el ends here ;;; init.el ends here

View file

@ -49,6 +49,8 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }:
perl538Packages.TermReadKey perl538Packages.TermReadKey
pinentry-qt pinentry-qt
pixman pixman
plan9port
edwood
podman-compose podman-compose
pwvucontrol pwvucontrol
qtpass qtpass