Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion core/templates/.spacemacs.template
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion layers/+spacemacs/spacemacs-editing/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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=.
Expand Down
14 changes: 14 additions & 0 deletions layers/+spacemacs/spacemacs-editing/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
smile13241324 marked this conversation as resolved.
Show resolved Hide resolved
ws-butler))

;; Initialization of packages
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layers/LAYERS.org
Original file line number Diff line number Diff line change
Expand Up @@ -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=.
Expand Down