Commit graph

640 commits

Author SHA1 Message Date
Daanturo
65561df25f Improve multiple-cursors compatibility with evil-multiedit
After exiting `multiple-cursors`, when the previous state is
multiedit{,-insert}, return to normal state.

Use case:
- Mark occurrences with evil-multiedit
- `iedit-switch-to-mc-mode` ("M-M")
- Make some edit
- "C-g" to exit `multiple-cursors`

Expected behaviour: Return to evil's normal-state
Observed behaviour before the patch: Emacs stays on emacs-state
2021-07-22 11:38:41 +07:00
Henrik Lissner
084918f4ea editor/evil: correct evil-collection module name 2021-07-12 00:19:49 -04:00
Henrik Lissner
69cfc60243 Bump :editor
abo-abo/lispy@38a7df4 -> abo-abo/lispy@e9731aa
emacs-evil/evil-collection@b6025cf -> emacs-evil/evil-collection@9be3805
emacs-evil/evil@1b3db63 -> emacs-evil/evil@b237462
emacs-straight/adaptive-wrap@91e939b -> emacs-straight/adaptive-wrap@0d5b4a0
emacsorphanage/god-mode@02a402b -> emacsorphanage/god-mode@1d7d647
hlissner/doom-snippets@f7747da -> hlissner/doom-snippets@5c0eb5b
justinbarclay/parinfer-rust-mode@f130fa0 -> justinbarclay/parinfer-rust-mode@c2c1bbe
magnars/multiple-cursors.el@7b13b03 -> magnars/multiple-cursors.el@616fbdd
noctuid/lispyville@89316f0 -> noctuid/lispyville@9c14bed
redguardtoo/evil-nerd-commenter@b8ac35f -> redguardtoo/evil-nerd-commenter@118bebd
willghatch/evil-textobj-anyblock@29280cd -> willghatch/evil-textobj-anyblock@29280cd
2021-07-11 17:52:08 -04:00
Itai Y. Efrat
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
Henrik Lissner
3bbebd245e
Merge pull request #5202 from meltinglava/develop
removed unused use in "file-template rust main"
2021-07-08 18:04:20 -04:00
Henrik Lissner
bbd15a16ee
Merge pull request #5179 from RBckmnn/Fix#5128
Fix #5128: No format-on-save by lsp-formatters
2021-07-08 17:45:33 -04:00
meltinglava
85264fea5d
Merge branch 'hlissner:develop' into develop 2021-07-08 13:47:55 +02:00
Henrik Lissner
400fa0836d editor/evil: update disable instructions in readme
Fixes #5242
2021-07-07 12:05:15 -04:00
Leo Okawa Ericson
7b3b74c2ad Remove workaround for upstream lispyville PR
https://github.com/noctuid/lispyville/pull/297 was merged which makes
the changes from https://github.com/hlissner/doom-emacs/pull/5101 obsolete.
2021-07-03 18:47:52 +02:00
meltinglava
3eac1f4e8a removed unused use in "file-template rust main" 2021-06-23 22:52:27 +02:00
Ralf Beckmann
012b759e98 Fix #5128: No format-on-save by lsp-formatters
A call to `format-all--formatter-executable` with the formatter being
equal to `'lsp` or `'eglot` will return `nil`. Therefore, `funcall` was
never called in those cases.
2021-06-14 23:52:16 +02:00
Henrik Lissner
751569f545 Fix +tabs:previous-or-goto typo 2021-06-06 17:49:26 -04:00
Henrik Lissner
47bce8856d Fix gr in compilation buffers (for evil users) 2021-06-06 01:19:49 -04:00
Henrik Lissner
ea80826fd2 gt/gT = add goto Nth tab behavior
As it does in vim.
2021-06-05 14:24:17 -04:00
Henrik Lissner
60b595321e Lazy-load yasnippet harder for faster first-file load time
+ Rather than waiting for the first "interactive" major mode to be
  visited to activate yas-minor-mode, we wait until the first time the
  user invokes a snippet command to activate yas-global-mode.
+ yas-reload-all is one of the bottlenecks when loading a file for the
  first time. Deferring it further should help with this.
+ yas-global-mode reaches more major modes than our former list of
  hooks (fixes #5140).

Closes #5140
2021-06-05 13:12:00 -04:00
Seong Yong-ju
63cc08be98 lang/java: Add file templates
- `__annotation-type`
- `__enum`
- `__interface`
- `__record`
- `__` → `__class` (rename)
2021-06-05 23:21:53 +09:00
Henrik Lissner
9fb96f9eeb Fix 'setting-constant enable-multibyte-characters' error
Regression caused by 78dde6efd.

Mentioned in #5133
2021-06-04 22:45:36 -04:00
Henrik Lissner
78dde6efdd Fix #5133: don't kill LSP after reformatting
This happened because LSP hooks on kill-buffer-hook (and possibly
others) caused our temporary formatting buffer to talk to LSP as if it
were the original buffer. When the temp buffer was cleaned up, LSP
assumed the original buffer had been closed. No more!

In fact, to avoid similar issues, let's avoid any complex functionality
in hooks in this temp buffer.
2021-06-04 22:22:57 -04:00
Henrik Lissner
68b422c786 editor/format: redesign
This isn't the apheleia rewrite, just a redesign to fix the module's
current issues with its +onsave feature.

+ Rethinks how the formatter dispatches to lsp/eglot's formatter.
+ Stops format-all from being too imposing with its warnings.
+ Relies more on format-all-mode to control formatting-on-save.
+ Sidestep +format-buffer-a hackery when using lsp/eglot formatters.

Fixes #5121
Fixes #5128
Fixes #5133
2021-06-04 16:15:29 -04:00
Henrik Lissner
8cfe38ebb6
Merge pull request #5115 from jmorag/gitignore-haskell
Add haskell gitignore template
2021-06-04 14:20:45 -04:00
Henrik Lissner
027dec3b5f editor/format: use unabbreviated commit
Fix #5136
2021-06-04 14:08:42 -04:00
Henrik Lissner
bd94250503 Fix #5113: "defining as dynamic an already lexical var" error
Due to a dynamic variable being let-bound while evil-textobj-anyblock is
loading, so load it first.
2021-05-30 12:21:13 -04:00
Joseph Morag
b20736c9b7 Add haskell gitignore template 2021-05-30 11:07:29 -04:00
Henrik Lissner
d32698b326 editor/evil: remove redundant put & add comment
evil-define-key* now declares its own indentation, so I don't have to.
2021-05-29 12:48:44 -04:00
Henrik Lissner
d1bed29680 Half-revert 69ea5c202
Fix cursor color stickiness when toggling emacs state.
2021-05-29 12:45:17 -04:00
Henrik Lissner
69ea5c2020 editor/evil: simplify cursor color change logic
Fixes race conditions where the cached cursor's color doesn't match the
loaded theme's.
2021-05-28 14:06:16 -04:00
Henrik Lissner
33dbae7cb2 Fix format-all formatters not activating on save 2021-05-28 00:11:28 -04:00
Henrik Lissner
005a71e467 Fix #5104 (again): void-function +format-lsp-enable-on-save-maybe-h 2021-05-27 19:32:56 -04:00
Henrik Lissner
c9653ba8ae Fix #5104: void-function +format-lsp-enable-on-save-maybe-h 2021-05-27 12:51:56 -04:00
Henrik Lissner
6e7a19a2f4 Enable formatter if LSP formatter is available
The :editor format module uses either the formatter available through an
LSP server or a formatter that the format-all package supports.  With
:editor (format +onsave), this formatter is triggered when a file is
saved. However, if no format-all formatter is available, this on-save
behavior is disabled, even if an LSP formatter is available. This fixes
that.
2021-05-26 21:45:00 -04:00
Leo Okawa Ericson
3b18153ea7 Advice lispyville-end-of-defun to go past defuns
`lispyville-end-of-defun' doesn't go to the next defun when point is
already at the end of a defun, whereas `lispyville-beginning-of-defun'
does. This commit fixes this inconsistency by matching
`lispyville-end-of-defun''s behaviour with `lispyville-beginning-of-defun'.

`line-end-position' isn't enough because it never returns `t' in normal
mode (in normal mode the point can't reach the true end of a line).
2021-05-26 18:51:55 +02:00
Henrik Lissner
3ba364ae10 Minor refactoring across the board 2021-05-23 22:09:07 -04:00
Henrik Lissner
31ca03c7a0 editor/format: never prompt for formatter on init 2021-05-22 14:21:45 -04:00
Henrik Lissner
141938ef94 editor/fold: fix load-order dependency on evil
In case the user is enabling this module before the evil module.
2021-05-15 19:24:40 -04:00
Henrik Lissner
80295728d8 editor/parinfer: refactor 2021-05-11 21:29:54 -04:00
Henrik Lissner
b0e59ccdcc Fix #5030: leave rustfmt to :editor format 2021-05-11 17:00:11 -04:00
Henrik Lissner
8492e9ba93 Bump :editor snippets
hlissner/doom-snippets@afe549b -> hlissner/doom-snippets@f7747da

To include hotfix: hlissner/doom-snippets#67
2021-05-10 15:47:36 -04:00
Henrik Lissner
857d266e72 Inhibit format-all in modes without a formatter
Should stop format-all's error from causing trouble in modes that don't
have a registered formatter, like mu4e, org-msg-edit-mode,
org-journal-mode, and others.
2021-05-10 04:43:35 -04:00
Henrik Lissner
b029fdfc9c evil-respect-visual-line-mode = nil
Reverts f0eb015

The conflicts are not resolved. This also breaks propagated edits on
visual line + I/A. A more convoluted fix is needed.

Relevant to #2447
2021-05-10 03:12:31 -04:00
Henrik Lissner
61376a2ca0 Fix #5001: disable formatter in org-msg-edit-mode 2021-05-07 14:17:04 -04:00
Henrik Lissner
b2c4e0f168 editor/format: disable formatter for rustic-mode
rustic provides its own internal formatter. Using that instead of
format-all is more reliable for the moment.
2021-05-07 02:37:47 -04:00
Henrik Lissner
a0c73c2975 Prevent evil-collection-calc loading too early 2021-05-06 04:27:33 -04:00
Grazfather
7287491906
Update lispy readme 2021-05-04 16:24:25 -04:00
Grazfather
f8d362638e
Add lispy-mode hook to fennel-mode 2021-05-04 16:22:55 -04:00
Henrik Lissner
437c33a8b2 Fix #4949: evil-want-visual-char-semi-exclusive = nil
This setting is _old_. Why it was set has been long forgotten, so I will
revert it to its default value of nil (which also fixes #4949).
2021-04-29 18:18:17 -04:00
Henrik Lissner
065d06edbb Bump :editor evil
emacs-evil/evil@d998a81 -> emacs-evil/evil@1b3db63
cute-jumper/evil-embrace.el@4379ade -> cute-jumper/evil-embrace.el@464e8ec

cute-jumper/evil-embrace.el#7 was merged, so our hack is no longer
needed.
2021-04-18 22:25:45 -04:00
Henrik Lissner
1ebfa35b71 editor/evil: fix csw, csW, css, & csp text objects
Until cute-jumper/evil-embrace.el#7 is merged.
2021-04-18 01:21:41 -04:00
James Conroy-Finn
2acfbcb79d
Bump :editor evil
emacs-evil/evil-collection@b45ec5bemacs-evil/evil-collection@b6025cf
emacs-evil/evil@7eace67 -> emacs-evil/evil@d998a81

The register system has been rejigged in the last week, and some
packages in the Evil ecosystem are already making use of the new vars.

229ebb4ea1
https://github.com/mamapanda/evil-owl/issues/10
2021-04-16 21:53:01 +01:00
Henrik Lissner
84d5cda86f
Merge pull request #4808 from andreiltd/c-mode-header-template-remove-double-underscore
Remove double underscore from c header templates
2021-04-13 19:11:28 -04:00
Henrik Lissner
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00