Refactor removal of default smartparens rules for certain modes
This commit is contained in:
parent
148f0a6e34
commit
dc33c72d19
3 changed files with 10 additions and 11 deletions
|
@ -3,10 +3,11 @@
|
||||||
(def-package! elixir-mode
|
(def-package! elixir-mode
|
||||||
:mode "\\.exs?$"
|
:mode "\\.exs?$"
|
||||||
:mode "\\.elixir2$"
|
:mode "\\.elixir2$"
|
||||||
|
:init
|
||||||
|
;; sp's default elixir rules are obnoxious, so disable them
|
||||||
|
(provide 'smartparens-elixir)
|
||||||
:config
|
:config
|
||||||
;; disable standard config; more disruptive than it needs to be
|
;; ...and only complete the basics
|
||||||
(map-delete sp-pairs 'elixir-mode)
|
|
||||||
;; only complete the basics
|
|
||||||
(sp-with-modes 'elixir-mode
|
(sp-with-modes 'elixir-mode
|
||||||
(sp-local-pair "do" "end"
|
(sp-local-pair "do" "end"
|
||||||
:when '(("RET" "<evil-ret>"))
|
:when '(("RET" "<evil-ret>"))
|
||||||
|
|
|
@ -18,12 +18,8 @@
|
||||||
"Sets the directory where AUCTeX will search for PDFs associated to BibTeX references."
|
"Sets the directory where AUCTeX will search for PDFs associated to BibTeX references."
|
||||||
`(setq +latex-bibtex-dir ,dir))
|
`(setq +latex-bibtex-dir ,dir))
|
||||||
|
|
||||||
|
;; sp's default latex rules are obnoxious, so disable them
|
||||||
(after! smartparens-latex
|
(provide 'smartparens-latex)
|
||||||
(map-delete sp-pairs 'LaTeX-mode)
|
|
||||||
(map-delete sp-pairs 'latex-mode)
|
|
||||||
(map-delete sp-pairs 'tex-mode)
|
|
||||||
(map-delete sp-pairs 'plain-tex-mode))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -3,14 +3,16 @@
|
||||||
(def-package! lua-mode
|
(def-package! lua-mode
|
||||||
:mode "\\.lua$"
|
:mode "\\.lua$"
|
||||||
:interpreter "lua"
|
:interpreter "lua"
|
||||||
|
:init
|
||||||
|
;; sp's default lua rules are obnoxious, so disable them. Use snippets
|
||||||
|
;; instead!
|
||||||
|
(provide 'smartparens-lua)
|
||||||
:config
|
:config
|
||||||
(add-hook 'lua-mode-hook #'flycheck-mode)
|
(add-hook 'lua-mode-hook #'flycheck-mode)
|
||||||
|
|
||||||
(set! :lookup 'lua-mode :documentation 'lua-search-documentation)
|
(set! :lookup 'lua-mode :documentation 'lua-search-documentation)
|
||||||
(set! :electric 'lua-mode :words '("else" "end"))
|
(set! :electric 'lua-mode :words '("else" "end"))
|
||||||
(set! :repl 'lua-mode #'+lua/repl)
|
(set! :repl 'lua-mode #'+lua/repl)
|
||||||
;; sp's lua-specific rules are obnoxious, so we disable them
|
|
||||||
(map-delete sp-pairs 'lua-mode)
|
|
||||||
|
|
||||||
(def-menu! +lua/build-menu
|
(def-menu! +lua/build-menu
|
||||||
"Build/compilation commands for `lua-mode' buffers."
|
"Build/compilation commands for `lua-mode' buffers."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue