refining keybinds for lisps

This commit is contained in:
Matt Nish-Lapidus 2023-11-05 14:34:18 -05:00
parent f6aae022ff
commit a301c44d62
2 changed files with 26 additions and 8 deletions

View file

@ -82,7 +82,7 @@
window-resize-pixelwise t)))
;; tabs! i like them
;; (setq-default indent-tabs-mode t)
(setq-default indent-tabs-mode t)
(setq-default tab-width 2)
;; import all my customized keybindings based on doom evil mode, but without evil.
@ -102,7 +102,7 @@
(after! smart-tabs-mode
(smart-tabs-insinuate 'c 'javascript 'python))
;; Add consult-line seraches to isearch history (both regular and regex) -- can now use meow 'n' to continue search as well as isearch
;; Add consult-line searches to isearch history (both regular and regex) -- can now use meow 'n' to continue search as well as isearch
(advice-add #'consult-line :after
(lambda (&rest _)
(when consult--line-history
@ -123,9 +123,20 @@
;; svelte support
(add-to-list 'auto-mode-alist '("\\.svelte\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.css\\'" . web-mode))
(setq web-mode-engines-alist
'(("svelte" . "\\.svelte\\'")))
;; web-mode settings
(add-hook! web-mode (web-mode-toggle-current-element-highlight))
(after! web-mode
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2))
(after! markdown-mode
(setq markdown-list-indent-width 2)
(setq markdown-enable-wiki-links t))
;; fix centaur tabs to show at the right times and add my muscle memory keybind
(after! centaur-tabs
@ -176,11 +187,13 @@
(lambda (path)
(load (concat path "res/emacs/cl-patterns-helpers") nil nil nil t)
(load (concat path "res/emacs/cl-patterns-skeletons") nil nil nil t)))
;; (define-key sly-mode-map (kbd "C-c p") 'cl-patterns-play-or-end-context-or-select-pdef)
;; (define-key sly-mode-map (kbd "C-c P") 'cl-patterns-play-or-stop-context-or-select-pdef)
;; (define-key sly-mode-map (kbd "C-c s") 'cl-patterns-stop-all)
;; (define-key sly-doc-map (kbd "s") 'cl-patterns-supercollider-documentation))
(add-hook 'sly-connected-hook 'cl-patterns-helpers-load)))
(define-key sly-mode-map (kbd "C-c p") 'cl-patterns-play-or-end-context-or-select-pdef)
(define-key sly-mode-map (kbd "C-c P") 'cl-patterns-play-or-stop-context-or-select-pdef)
(define-key sly-mode-map (kbd "C-c s") 'cl-patterns-stop-all)
(define-key sly-doc-map (kbd "s") 'cl-patterns-supercollider-documentation)
(add-hook! 'sly-connected-hook 'cl-patterns-helpers-load)))
(set-popup-rule! "*sly-description*" :side 'right :size '0.52)
;; adding supercollider path
(setq exec-path (append exec-path '("/Applications/SuperCollider.app/Contents/MacOS/")))

View file

@ -79,13 +79,18 @@
"." #'meow-bounds-of-thing
"\\" #'bookmark-jump
"'" #'repeat
":" #'eval-last-sexp
"=" #'meow--eval-sexp
"[" #'sp-backward-sexp
"]" #'sp-forward-sexp
"{" #'sp-backward-up-sexp
"}" #'sp-down-sexp
"<escape>" #'corfu-quit))
(defun meow--eval-sexp ()
(interactive)
(if (derived-mode-p 'lisp-mode)
(sly-eval-defun)
(eros-eval-defun nil)))
(defun meow--post-isearch-function ()
(unless isearch-mode-end-hook-quit