Parinfer time
This commit is contained in:
parent
64ae50d419
commit
9db349a29c
3 changed files with 117 additions and 107 deletions
|
@ -42,8 +42,6 @@
|
|||
git-gutter
|
||||
goto-chg
|
||||
keychain-environment
|
||||
lispy
|
||||
lispyville
|
||||
lsp-scheme
|
||||
magit
|
||||
magit-todos
|
||||
|
@ -59,9 +57,11 @@
|
|||
org-rainbow-tags
|
||||
org-roam
|
||||
org-roam-ui
|
||||
parinfer-rust-mode
|
||||
pass
|
||||
password-store
|
||||
password-store-otp
|
||||
plan9-theme
|
||||
rainbow-delimiters
|
||||
tempel
|
||||
tree-sitter
|
||||
|
|
218
emacs/init.el
218
emacs/init.el
|
@ -62,6 +62,7 @@
|
|||
(minibuffer-prompt-properties
|
||||
(read-only t cursor-intangible t face minibuffer-prompt))
|
||||
(tab-always-indent 'complete)
|
||||
(indent-tabs-mode nil)
|
||||
(enable-recursive-minibuffers t)
|
||||
(enable-remote-dir-locals t)
|
||||
(global-hl-line-mode t)
|
||||
|
@ -123,7 +124,7 @@
|
|||
(catppuccin-italic-comments t)
|
||||
:custom-face
|
||||
(font-lock-doc-face ((t (:inherit font-lock-comment-face
|
||||
:foreground "#fab387"))))
|
||||
:foreground "#fab387"))))
|
||||
:config
|
||||
(load-theme 'catppuccin))
|
||||
|
||||
|
@ -152,8 +153,8 @@
|
|||
(evil-mode 1)
|
||||
:bind
|
||||
(:map evil-normal-state-map
|
||||
("<leader>f" . 'find-file)
|
||||
("<leader>k" . 'kill-buffer)))
|
||||
("<leader>f" . 'find-file)
|
||||
("<leader>k" . 'kill-buffer)))
|
||||
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
|
@ -175,20 +176,21 @@
|
|||
:config
|
||||
(with-eval-after-load 'eglot
|
||||
(setq completion-category-defaults nil))
|
||||
(setq completion-styles '(orderless basic)
|
||||
completion-category-defaults nil
|
||||
completion-category-overrides '((file (styles partial-completion)))))
|
||||
(setq completion-styles
|
||||
'(orderless basic)
|
||||
completion-category-defaults nil
|
||||
completion-category-overrides '((file (styles partial-completion)))))
|
||||
|
||||
(use-package consult
|
||||
:bind
|
||||
(:map evil-normal-state-map
|
||||
("<leader><SPC>" . 'consult-find)
|
||||
("<leader>gs" . 'consult-eglot-symbols)
|
||||
("<leader>b" . 'consult-buffer)
|
||||
("<leader>gb" . 'consult-project-buffer)
|
||||
("<leader>g/" . 'consult-git-grep)
|
||||
("<leader>/" . 'consult-grep)
|
||||
("/" . 'consult-line)))
|
||||
(:map evil-normal-state-map
|
||||
("<leader><SPC>" . 'consult-find)
|
||||
("<leader>gs" . 'consult-eglot-symbols)
|
||||
("<leader>b" . 'consult-buffer)
|
||||
("<leader>gb" . 'consult-project-buffer)
|
||||
("<leader>g/" . 'consult-git-grep)
|
||||
("<leader>/" . 'consult-grep)
|
||||
("/" . 'consult-line)))
|
||||
|
||||
(use-package embark
|
||||
:bind
|
||||
|
@ -291,51 +293,62 @@
|
|||
(use-package goto-chg
|
||||
:bind
|
||||
(:map evil-normal-state-map
|
||||
("g," . 'goto-last-change)
|
||||
("g;" . 'goto-last-change-reverse)))
|
||||
("g," . 'goto-last-change)
|
||||
("g;" . 'goto-last-change-reverse)))
|
||||
|
||||
;;;; Lisp Navigation and Editing
|
||||
;;;;; Basic
|
||||
(use-package lispy
|
||||
(use-package parinfer-rust-mode
|
||||
:custom
|
||||
(lispy-close-quotes-at-end-p t)
|
||||
(lispy-compat '("cider" "edebug" "magit-blame-mode"))
|
||||
(lispy-visit-method #'consult-find)
|
||||
(lispy-occur-backend #'consult-line)
|
||||
(parinfer-rust-auto-download t)
|
||||
:hook
|
||||
emacs-lisp-mode
|
||||
clojure-ts-mode
|
||||
scheme-mode
|
||||
(parinfer-rust-mode . electric-pair-local-mode)
|
||||
:config
|
||||
(evil-define-key 'insert 'prog-mode-map
|
||||
"(" #'lispy-parens
|
||||
"{" #'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))
|
||||
(evil-define-key 'normal 'parinfer-rust-mode-map
|
||||
(kbd "r") #'raise-sexp))
|
||||
;; (use-package lispy
|
||||
;; :custom
|
||||
;; (lispy-close-quotes-at-end-p t)
|
||||
;; (lispy-compat '("cider" "edebug" "magit-blame-mode"))
|
||||
;; (lispy-visit-method #'consult-find)
|
||||
;; (lispy-occur-backend #'consult-line)
|
||||
;; :hook
|
||||
;; emacs-lisp-mode
|
||||
;; scheme-mode
|
||||
;; :config
|
||||
;; (evil-define-key 'insert 'clojure-ts-mode-map
|
||||
;; "(" #'lispy-parens
|
||||
;; "{" #'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
|
||||
:bind
|
||||
(:map evil-normal-state-map
|
||||
("<leader>," . 'lispyville-comment-or-uncomment)
|
||||
("<leader>." . 'lispyville-comment-and-clone-dwim)
|
||||
("<leader>ci" . 'lispyville-comment-or-uncomment-line))
|
||||
:hook
|
||||
(lispy-mode . lispyville-mode))
|
||||
;; (use-package lispyville
|
||||
;; :bind
|
||||
;; (:map evil-normal-state-map
|
||||
;; ("<leader>," . 'lispyville-comment-or-uncomment)
|
||||
;; ("<leader>." . 'lispyville-comment-and-clone-dwim)
|
||||
;; ("<leader>ci" . 'lispyville-comment-or-uncomment-line))
|
||||
;; :hook
|
||||
;; (lispy-mode . lispyville-mode))
|
||||
|
||||
;;;;; Visual Aid
|
||||
(use-package rainbow-delimiters
|
||||
:hook
|
||||
emacs-lisp-mode
|
||||
scheme-mode)
|
||||
;; (use-package rainbow-delimiters
|
||||
;; :hook
|
||||
;; emacs-lisp-mode
|
||||
;; scheme-mode)
|
||||
|
||||
;;;; Programming
|
||||
(use-package editorconfig
|
||||
|
@ -351,12 +364,12 @@
|
|||
|
||||
(defun my/eglot-capf ()
|
||||
(setq-local completion-at-point-functions
|
||||
(list (cape-super-capf
|
||||
#'eglot-completion-at-point
|
||||
#'tempel-complete
|
||||
#'cape-dabbrev
|
||||
#'cape-file
|
||||
#'cape-dict))))
|
||||
(list (cape-super-capf
|
||||
#'eglot-completion-at-point
|
||||
#'tempel-complete
|
||||
#'cape-dabbrev
|
||||
#'cape-file
|
||||
#'cape-dict))))
|
||||
|
||||
(use-package eglot
|
||||
:custom
|
||||
|
@ -368,34 +381,34 @@
|
|||
(eglot-inlay-hints-mode +1)
|
||||
(my/eglot-capf))
|
||||
(setq-default eglot-workspace-configuration
|
||||
'((clojure-lsp (maxCompletions . 300))))
|
||||
'((clojure-lsp (maxCompletions . 300))))
|
||||
(add-to-list 'eglot-server-programs
|
||||
'((clojure-ts-mode clojurec-ts-mode clojurescript-ts-mode)
|
||||
"clojure-lsp"
|
||||
:initializationOptions
|
||||
(:preferences
|
||||
(:includeInlayParameterNameHints
|
||||
"all"
|
||||
:includeInlayParameterNameHintsWhenArgumentMatchesName
|
||||
t
|
||||
:includeInlayFunctionParameterTypeHints
|
||||
t
|
||||
:includeInlayVariableTypeHints
|
||||
t
|
||||
:includeInlayVariableTypeHintsWhenTypeMatchesName
|
||||
t
|
||||
:includeInlayPRopertyDeclarationTypeHints
|
||||
t
|
||||
:includeInlayFunctionLikeReturnTypeHints
|
||||
t
|
||||
:includeInlayEnumMemberValueHints
|
||||
t))))
|
||||
'((clojure-ts-mode clojurec-ts-mode clojurescript-ts-mode)
|
||||
"clojure-lsp"
|
||||
:initializationOptions
|
||||
(:preferences
|
||||
(:includeInlayParameterNameHints
|
||||
"all"
|
||||
:includeInlayParameterNameHintsWhenArgumentMatchesName
|
||||
t
|
||||
:includeInlayFunctionParameterTypeHints
|
||||
t
|
||||
:includeInlayVariableTypeHints
|
||||
t
|
||||
:includeInlayVariableTypeHintsWhenTypeMatchesName
|
||||
t
|
||||
:includeInlayPRopertyDeclarationTypeHints
|
||||
t
|
||||
:includeInlayFunctionLikeReturnTypeHints
|
||||
t
|
||||
:includeInlayEnumMemberValueHints
|
||||
t))))
|
||||
:hook
|
||||
(eglot-managed-mode . (lambda ()
|
||||
(add-hook 'before-save-hook
|
||||
(lambda ()
|
||||
(call-interactively #'eglot-format-buffer))
|
||||
nil 'local)))
|
||||
(add-hook 'before-save-hook
|
||||
(lambda ()
|
||||
(call-interactively #'eglot-format-buffer))
|
||||
nil 'local)))
|
||||
(eglot-managed-mode . eglot-inlay-hints-mode)
|
||||
(eglot-managed-mode . #'my/eglot-capf))
|
||||
|
||||
|
@ -407,36 +420,31 @@
|
|||
|
||||
;;;;; Clojure
|
||||
(use-package clojure-ts-mode
|
||||
:after (tree-sitter lispy)
|
||||
:after tree-sitter
|
||||
:config
|
||||
(require 'sesman)
|
||||
(sesman-install-menu clojure-mode-map)
|
||||
:hook
|
||||
((clojure-ts-mode . lispy-mode)
|
||||
(clojure-ts-mode . eglot-ensure)
|
||||
(clojure-ts-mode . rainbow-delimiters-mode)
|
||||
((clojure-ts-mode . eglot-ensure)
|
||||
(clojure-ts-mode . (lambda ()
|
||||
(setq-local sesman-system 'CIDER)))
|
||||
(setq-local sesman-system 'CIDER)))
|
||||
(clojure-ts-mode . (lambda ()
|
||||
(sesman-install-menu clojure-mode-map)))
|
||||
(sesman-install-menu clojure-mode-map)))
|
||||
(clojurec-ts-mode . (lambda ()
|
||||
(sesman-install-menu clojurec-mode-map)))
|
||||
(sesman-install-menu clojurec-mode-map)))
|
||||
(clojurescript-ts-mode . (lambda ()
|
||||
(sesman-install-menu clojurescript-mode-map))))
|
||||
(sesman-install-menu clojurescript-mode-map))))
|
||||
:mode
|
||||
("\\.clj\\'" . #'clojure-ts-mode)
|
||||
("\\.cljc\\'" . #'clojurec-ts-mode)
|
||||
("\\.cljs\\'" . #'clojurescript-ts-mode)
|
||||
: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
|
||||
'(clojure-ts-mode . clojure))
|
||||
'(clojure-ts-mode . clojure))
|
||||
(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
|
||||
'(clojurescript-ts-mode . clojure)))
|
||||
'(clojurescript-ts-mode . clojure)))
|
||||
|
||||
(use-package cider
|
||||
:hook
|
||||
|
@ -450,7 +458,7 @@
|
|||
;;;;; Chicken Scheme
|
||||
(defun flymake-chicken-init ()
|
||||
(add-hook 'flymake-diagnostic-functions
|
||||
#'flymake-chicken-backend nil t)
|
||||
#'flymake-chicken-backend nil t)
|
||||
(flymake-mode))
|
||||
|
||||
(use-package geiser
|
||||
|
@ -465,7 +473,7 @@
|
|||
(lsp-scheme-implementation "chicken")
|
||||
:config
|
||||
(progn (add-to-list 'eglot-server-programs
|
||||
'(scheme-mode . ("chicken-lsp-server"))))
|
||||
'(scheme-mode . ("chicken-lsp-server"))))
|
||||
(require 'lsp-scheme))
|
||||
|
||||
;; (use-package flymake-chicken
|
||||
|
@ -512,7 +520,7 @@
|
|||
:after magit
|
||||
:config
|
||||
(advice-add 'magit :after (lambda (&rest _args)
|
||||
(call-interactively #'forge-pull))))
|
||||
(call-interactively #'forge-pull))))
|
||||
|
||||
(use-package code-review
|
||||
:after forge
|
||||
|
@ -525,7 +533,7 @@
|
|||
;;;; LaTeX
|
||||
;; https://github.com/politza/pdf-tools/#known-problems
|
||||
(add-hook 'TeX-after-compilation-finished-functions
|
||||
#'TeX-revert-document-buffer)
|
||||
#'TeX-revert-document-buffer)
|
||||
|
||||
;;;; Communication
|
||||
;;;;; IRC
|
||||
|
@ -535,14 +543,14 @@
|
|||
(circe-chat-mode . enable-circe-color-nicks)
|
||||
:custom
|
||||
(circe-network-options
|
||||
'(("Lyrion Libera Chat"
|
||||
:host "lyrion.ch"
|
||||
:port 6697
|
||||
:tls t
|
||||
:nick "zilti"
|
||||
:sasl-username "zilti/irc.libera.chat"
|
||||
:sasl-password (lambda (_)
|
||||
(password-store-get "Privat/Soju"))))))
|
||||
'(("Lyrion Libera Chat"
|
||||
:host "lyrion.ch"
|
||||
:port 6697
|
||||
:tls t
|
||||
:nick "zilti"
|
||||
:sasl-username "zilti/irc.libera.chat"
|
||||
:sasl-password (lambda (_)
|
||||
(password-store-get "Privat/Soju"))))))
|
||||
|
||||
(provide 'init)
|
||||
;;; init.el ends here
|
||||
|
|
2
home.nix
2
home.nix
|
@ -49,6 +49,8 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }:
|
|||
perl538Packages.TermReadKey
|
||||
pinentry-qt
|
||||
pixman
|
||||
plan9port
|
||||
edwood
|
||||
podman-compose
|
||||
pwvucontrol
|
||||
qtpass
|
||||
|
|
Loading…
Reference in a new issue