File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,25 @@ experience, you can add the following to your `elixir-mode-hook`:
223223 (ruby-end-mode +1)))
224224```
225225
226+ Also, if you use [ smartparens] ( https://github.com/Fuco1/smartparens ) you can
227+ piggyback on some of its functionality for dealing with Ruby's ` do .. end `
228+ blocks. A sample configuration would be:
229+
230+ ``` lisp
231+ (sp-with-modes '(elixir-mode)
232+ (sp-local-pair "fn" "end"
233+ :when '(("SPC" "RET"))
234+ :actions '(insert navigate))
235+ (sp-local-pair "do" "end"
236+ :when '(("SPC" "RET"))
237+ :post-handlers '(sp-ruby-def-post-handler)
238+ :actions '(insert navigate))
239+ (sp-local-pair "case" "end"
240+ :when '(("SPC" "RET"))
241+ :post-handlers '(sp-ruby-def-post-handler)
242+ :actions '(insert navigate)))
243+ ```
244+
226245## Elixir Tooling Integration
227246
228247If you looking for elixir tooling integration for Emacs, check: [ alchemist.el] ( https://github.com/tonini/alchemist.el )
You can’t perform that action at this time.
0 commit comments