mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
sp-max-pair-length = 5 (for performance)
This commit is contained in:
@ -238,7 +238,8 @@
|
||||
(setq sp-autowrap-region nil ; let evil-surround handle this
|
||||
sp-highlight-pair-overlay nil
|
||||
sp-cancel-autoskip-on-backward-movement nil
|
||||
sp-show-pair-delay 0)
|
||||
sp-show-pair-delay 0
|
||||
sp-max-pair-length 5)
|
||||
|
||||
(smartparens-global-mode 1)
|
||||
(require 'smartparens-config)
|
||||
|
@ -8,13 +8,17 @@
|
||||
(def-company-backend! lua-mode (lua yasnippet))
|
||||
(def-electric! lua-mode :words ("else" "end"))
|
||||
(def-repl! lua-mode doom/inf-lua)
|
||||
(add-hook! lua-mode
|
||||
(setq-local sp-max-pair-length 9))
|
||||
(sp-with-modes '(lua-mode)
|
||||
;; disable defaults
|
||||
(sp-local-pair "if" nil :actions :rem)
|
||||
(sp-local-pair "while" nil :actions :rem)
|
||||
(sp-local-pair "function" nil :actions :rem)
|
||||
(sp-local-pair "if " " end")
|
||||
(sp-local-pair "then " " end")
|
||||
(sp-local-pair "do " " end")
|
||||
(sp-local-pair "if" "end" :when '(("RET")) :post-handlers '(" |\n[i]"))
|
||||
(sp-local-pair "then" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
||||
(sp-local-pair "do" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
||||
;; block functions
|
||||
|
Reference in New Issue
Block a user