tweaks to smartparens and clojure and lisp stuff

This commit is contained in:
Chris Cochrun 2023-05-25 09:27:01 -05:00
parent 8eeb93fa14
commit 686d14a6c6
3 changed files with 66 additions and 3 deletions

View file

@ -202,6 +202,9 @@ Let's also set org-mode as the scratch buffer mode
#+end_src
** Let's bootstrap straight.el
:PROPERTIES:
:ID: 20230524T150405.435338
:END:
Before bootstrapping straight, I've begun to move more and more of my configurations into Nix. To ensure that the packages used by Nix are loaded and straight defers to that, let's make sure they are found in the load path first.
#+begin_src emacs-lisp
(dolist (path load-path)
@ -296,7 +299,23 @@ Let's make parens and other delimiters easier to tell apart by making nested one
#+begin_src emacs-lisp
(use-package smartparens
:config
(smartparens-global-mode +1))
(smartparens-global-mode +1)
:general
('normal lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal cider-repl-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal clojurescript-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp))
#+end_src
#+begin_src emacs-lisp
@ -2835,6 +2854,21 @@ Friar is a fennel repl in the awesome repl. It allows you to interact with Aweso
:files (:defaults "*.lua" "*.fnl"))
:after fennel-mode)
#+end_src
*** Clojure
#+begin_src emacs-lisp
;; First install the package:
(use-package flycheck-clj-kondo
:ensure t)
;; then install the checker as soon as `clojure-mode' is loaded
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-clj-kondo))
(use-package cider
:after clojure-mode)
#+end_src
*** Yaml

31
init.el
View file

@ -131,7 +131,23 @@
(use-package smartparens
:config
(smartparens-global-mode +1))
(smartparens-global-mode +1)
:general
('normal lisp-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal cider-repl-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp)
('normal clojurescript-mode-map
"gl" 'sp-forward-slurp-sexp
"gh" 'sp-backward-slurp-sexp
"C-l" 'sp-forward-sexp
"C-h" 'sp-backward-sexp))
(use-package aggressive-indent
:config
@ -2087,6 +2103,19 @@ targets."
(use-package fennel-mode
:mode ("\\.fnl\\'" . fennel-mode))
;; First install the package:
(use-package flycheck-clj-kondo
:ensure t)
;; then install the checker as soon as `clojure-mode' is loaded
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-clj-kondo))
(use-package cider
:after clojure-mode)
(use-package yaml-mode
:mode ("\\.yml\\'" . yaml-mode))

View file

@ -1,4 +1,4 @@
;;; Automatically generated by recentf on Fri May 19 05:38:43 2023.
;;; Automatically generated by recentf on Sat May 20 05:45:25 2023.
(setq recentf-list 'nil)