mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-21 22:10:58 -07:00
Merge 309cdc65dc into ebf77f71c4
This commit is contained in:
commit
ea32258afe
2 changed files with 22 additions and 5 deletions
|
|
@ -62,14 +62,20 @@ Formatting is handled using the [[doom-module::editor format]] module via [[http
|
|||
#+end_quote
|
||||
|
||||
** racket-smart-open-bracket-mode
|
||||
~racket-smart-open-bracket-mode~ gets turned off automatically if you use
|
||||
~parinfer~, ~lispy~. If you wish to enable it:
|
||||
~racket-smart-open-bracket-mode~ is enabled by default (mimicking DrRacket's
|
||||
behavior). It automatically inserts ~(~ or ~[~ based on the surrounding
|
||||
syntactic context when you press ~[~. It is disabled automatically if you use
|
||||
~parinfer~ or ~lispy~.
|
||||
|
||||
To disable it, set ~+racket-smart-open-bracket-mode~ to nil before racket-mode
|
||||
loads:
|
||||
#+begin_src emacs-lisp
|
||||
;; in $DOOMDIR/config.el
|
||||
(with-eval-after-load 'racket-mode
|
||||
(add-hook 'racket-mode-hook #'racket-smart-open-bracket-mode))
|
||||
(setq +racket-smart-open-bracket-mode nil)
|
||||
#+end_src
|
||||
|
||||
To force a literal ~[~ without disabling the mode, use =C-q [=.
|
||||
|
||||
** Unicode Input
|
||||
The optional ~racket-unicode~ input method lets you type unicode characters such
|
||||
as λ or π. To enable unicode input for a single buffer, run
|
||||
|
|
|
|||
|
|
@ -4,6 +4,16 @@
|
|||
(after! projectile
|
||||
(add-to-list 'projectile-project-root-files "info.rkt"))
|
||||
|
||||
(defvar +racket-smart-open-bracket-mode t
|
||||
"If non-nil, enable `racket-smart-open-bracket-mode'.
|
||||
|
||||
This mode, inspired by DrRacket, automatically inserts `(' or `[' based on
|
||||
the surrounding syntactic context when you press `['. It is disabled
|
||||
automatically if `:editor parinfer' or `:editor lispy' is active.
|
||||
|
||||
Set this to nil to always insert the bracket you type. You can also use
|
||||
`C-q [' to force a literal `[' without disabling this mode.")
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
|
@ -58,7 +68,8 @@
|
|||
(cl-pushnew 'racket flycheck-disabled-checkers)))))
|
||||
|
||||
(unless (or (modulep! :editor parinfer)
|
||||
(modulep! :editor lispy))
|
||||
(modulep! :editor lispy)
|
||||
(not +racket-smart-open-bracket-mode))
|
||||
(add-hook mode-hook #'racket-smart-open-bracket-mode))
|
||||
|
||||
(map! (:map racket-xp-mode-map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue