[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:
- Loaded =lsp-julia= from melpa (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
- Added support for Colemak layout (thanks to Daniel Mijares, Lyall Cooper and
Eivind Fonn)

View File

@ -88,11 +88,16 @@
(defun julia/post-init-evil-surround ()
(with-eval-after-load 'evil-surround
(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")))))
(use-package evil-surround
:config
(progn
(add-hook
'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 ()
(use-package lsp-julia