[editing] Integrate evil-vimish-fold via dotspacemacs-folding-method

Not confident that I have plugged this in everywhere that I should have. However
I tested locally and it seems to be working.
This commit is contained in:
Keith Pinson 2020-10-14 15:44:55 -04:00 committed by Maximilian Wolff
parent e98d865e61
commit f4a050bc18
6 changed files with 22 additions and 6 deletions

View File

@ -1310,7 +1310,7 @@
=dotspacemacs-command-key=. This variable represents the key to press after
the leader key to execute =M-x=. Default value is ~SPC~.
- New variable =dotspacemacs-folding-method= to allow choosing between
different code folding methods. Currently supported are =evil= and =origami=.
different code folding methods. Currently supported are =evil=, =origami= and =vimish=.
Default value is =evil=. (thanks to ralesi)
- New variable =dotspacemacs-ex-substitute-global=, if non-nil then
the behavior of the =g= flag in =:substitute= ex-command is inverted.
@ -1342,7 +1342,9 @@
*** Distribution layer changes
- Add package =evil-ediff= (thanks to justbur)
- Add package =evil-visual-mark-mode= (thanks to nixmaniack)
- Add package =origmai= (used only if new variable =dotspacemacs-folding-method=
- Add packages =vimish-fold= and =evil-vimish-fold= (used only if new variable =dotspacemacs-folding-method=
is set to =origami=) (thanks to Keith Pinson)
- Add package =origami= (used only if new variable =dotspacemacs-folding-method=
is set to =origami=) (thanks to ralesi)
- Add package =link-hint=:
- ~SPC x o~ to use avy to select a link in the frame and open it

View File

@ -243,7 +243,7 @@ pressing `<leader> m`. Set it to `nil` to disable it.")
running Emacs in terminal.")
(defvar dotspacemacs-folding-method 'evil
"Code folding method. Possible values are `evil' and `origami'.")
"Code folding method. Possible values are `evil', `origami' and `vimish'.")
(defvar dotspacemacs-default-layout-name "Default"
"Name of the default layout.")

View File

@ -376,7 +376,7 @@ It should only modify the values of Spacemacs settings."
;; (default nil)
dotspacemacs-line-numbers nil
;; Code folding method. Possible values are `evil' and `origami'.
;; Code folding method. Possible values are `evil', `origami' and `vimish'.
;; (default 'evil)
dotspacemacs-folding-method 'evil

View File

@ -20,7 +20,7 @@ This layer adds packages to improve editing with Spacemacs.
- Support for selecting, copying and opening links using =avy= via =link-hint=.
- Adding of sample text via =lorem-ipsum=.
- Transient state for moving text via =move-text=.
- Support for folding of code via =origami=.
- Support for folding of code via =origami= and =evil-vimish-fold=.
- Support for password generation via =password-generator=.
- Support for improving parenthesis handling via =smartparens=.
- Automatic whitespace cleanup on save via =spacemacs-whitespace-cleanup=.

View File

@ -31,6 +31,8 @@
string-inflection
undo-tree
uuidgen
(vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method))
(evil-vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method))
ws-butler))
;; Initialization of packages
@ -275,6 +277,18 @@
;; Note: The key binding for the fold transient state is defined in
;; evil config
(defun spacemacs-editing/init-vimish-fold ()
(use-package vimish-fold
:ensure
:after evil))
(defun spacemacs-editing/init-evil-vimish-fold ()
(use-package evil-vimish-fold
:ensure
:after vimish-fold
:init
(setq evil-vimish-fold-target-modes '(prog-mode conf-mode text-mode))
:config (global-evil-vimish-fold-mode)))
(defun spacemacs-editing/init-password-generator ()
(use-package password-generator

View File

@ -840,7 +840,7 @@ Features:
- Support for selecting, copying and opening links using =avy= via =link-hint=.
- Adding of sample text via =lorem-ipsum=.
- Transient state for moving text via =move-text=.
- Support for folding of code via =origami=.
- Support for folding of code via =origami= or =evil-vimish-fold=.
- Support for password generation via =password-generator=.
- Support for improving parenthesis handling via =smartparens=.
- Automatic whitespace cleanup on save via =spacemacs-whitespace-cleanup=.