summaryrefslogtreecommitdiff
path: root/.config/emacs/archive
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-01-22 23:18:38 -0500
committerJack Jamison <jackqjamison@gmail.com>2026-01-22 23:18:38 -0500
commite5ca063e3bc3fba3e497edfb6482b4a9dba449e6 (patch)
tree7da87352c0085d4c95c5bbf836dee679297b2d56 /.config/emacs/archive
parent05fb99140b5541c3f3e3648fa1c8170e229118cd (diff)
switch to sway
Diffstat (limited to '.config/emacs/archive')
-rw-r--r--.config/emacs/archive/if_i_use_emacs_keybinds.el22
-rw-r--r--.config/emacs/archive/misc.el42
2 files changed, 64 insertions, 0 deletions
diff --git a/.config/emacs/archive/if_i_use_emacs_keybinds.el b/.config/emacs/archive/if_i_use_emacs_keybinds.el
new file mode 100644
index 0000000..647b7bc
--- /dev/null
+++ b/.config/emacs/archive/if_i_use_emacs_keybinds.el
@@ -0,0 +1,22 @@
+;; mwim
+(use-package mwim
+ :bind (("C-a" . mwim-beginning)
+ ("C-e" . mwim-end-of-line)))
+
+;; expand keybind
+(use-package expand-region
+ :bind("C-=" . er/expand-region))
+
+;; multiple cursors
+(use-package multiple-cursors
+ :bind (:map global-map
+ ("C->" . 'mc/mark-next-like-this)
+ ("C-<" . 'mc/mark-previous-like-this)
+ ("C-c C->" . 'mc/mark-all-like-this)
+ :map mc/keymap
+ ("<return>" . nil)))
+
+;; delete marked text when typing start
+(use-package delsel
+ :ensure nil
+ :hook (after-init . delete-selection-mode))
diff --git a/.config/emacs/archive/misc.el b/.config/emacs/archive/misc.el
new file mode 100644
index 0000000..07323b6
--- /dev/null
+++ b/.config/emacs/archive/misc.el
@@ -0,0 +1,42 @@
+;; Custom "in-line" text object
+(evil-define-text-object evil-inner-line (count &optional beg end type)
+ "Select the current line excluding leading/trailing whitespace."
+ (let* ((line-start (line-beginning-position))
+ (line-end (line-end-position))
+ (text (buffer-substring-no-properties line-start line-end))
+ (nonspace-start (string-match-p "\\S-" text))
+ (nonspace-end (or (save-match-data
+ (string-match-p "\\S-\\s-*\\'" text))
+ 0)))
+ (evil-range (+ line-start nonspace-start)
+ (+ line-start nonspace-end)
+ 'exclusive)))
+(define-key evil-inner-text-objects-map "l" 'evil-inner-line)
+
+;; icons
+(use-package nerd-icons)
+(use-package nerd-icons-dired
+ :hook
+ (dired-mode . nerd-icons-dired-mode))
+(use-package nerd-icons-completion
+ :after marginalia
+ :config
+ (nerd-icons-completion-mode)
+ (add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))
+(use-package nerd-icons-corfu
+ :after corfu
+ :config
+ (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
+
+;; == typst modes
+(use-package typst-ts-mode
+ :vc (:url "https://codeberg.org/meow_king/typst-ts-mode"
+ :rev :newest))
+
+(with-eval-after-load 'lsp-mode
+ (add-to-list 'lsp-language-id-configuration
+ '(typst-ts-mode . "typst"))
+ (lsp-register-client
+ (make-lsp-client :new-connection (lsp-stdio-connection "tinymist")
+ :activation-fn (lsp-activate-on "typst")
+ :server-id 'theme-check)))