[julia] Limit evil-surround redefinitions to julia-mode

problem:  The julia layer redefines evil-surround `b` globally to:
          begin <x> end
solution: Limit the redefinition to julia-mode buffers.
This commit is contained in:
duianto 2019-11-04 09:38:37 +01:00 committed by Maximilian Wolff
parent ea11a256fd
commit e863b6251e
No known key found for this signature in database
GPG key ID: 2DD07025BFDBD89A
2 changed files with 12 additions and 5 deletions

View file

@ -2133,6 +2133,8 @@ Other:
- Fixes: - Fixes:
- Loaded =lsp-julia= from melpa (thanks to Guido Kraemer) - Loaded =lsp-julia= from melpa (thanks to Guido Kraemer)
- Fixed =julia-mode-local-vars-hook= (thanks to Guido Kraemer) - Fixed =julia-mode-local-vars-hook= (thanks to Guido Kraemer)
- Limited =evil-surround-pairs-alist= redefinitions to julia mode
(thanks to duianto)
**** Keyboard layout **** Keyboard layout
- Added support for Colemak layout (thanks to Daniel Mijares, Lyall Cooper and - Added support for Colemak layout (thanks to Daniel Mijares, Lyall Cooper and
Eivind Fonn) Eivind Fonn)

View file

@ -88,11 +88,16 @@
(defun julia/post-init-evil-surround () (defun julia/post-init-evil-surround ()
(with-eval-after-load 'evil-surround (use-package evil-surround
(add-to-list 'evil-surround-pairs-alist '(?b . ("begin " . " end"))) :config
(add-to-list 'evil-surround-pairs-alist '(?q . ("quote " . " end"))) (progn
(add-to-list 'evil-surround-pairs-alist '(?: . (":(" . ")"))) (add-hook
(add-to-list 'evil-surround-pairs-alist '(?l . ("let " . " end"))))) 'julia-mode-hook
#'(lambda ()
(add-to-list 'evil-surround-pairs-alist '(?b . ("begin " . " end")))
(add-to-list 'evil-surround-pairs-alist '(?q . ("quote " . " end")))
(add-to-list 'evil-surround-pairs-alist '(?: . (":(" . ")")))
(add-to-list 'evil-surround-pairs-alist '(?l . ("let " . " end"))))))))
(defun julia/init-lsp-julia () (defun julia/init-lsp-julia ()
(use-package lsp-julia (use-package lsp-julia