Commit graph

854 commits

Author SHA1 Message Date
Henrik Lissner
1fce8522f8
bump: :editor multiple-cursors
gabesoft/evil-mc@63fd2fe0c2 -> gabesoft/evil-mc@bdf893ea6f
magnars/multiple-cursors.el@16223efc2d -> magnars/multiple-cursors.el@234806c832

- Fixes evil-mc for recent versions of evil (#7415).

Close: #7415
Co-authored-by: Mo0dy <Mo0dy@users.noreply.github.com>
2023-09-14 01:04:09 +02:00
Ellis Kenyo
dd68bbb7da
fix(format): removed unused argument 2023-09-13 20:21:08 +01:00
Ellis Kenyo
ce93f899fd
fix(format): improve function/module loading safety 2023-09-13 20:21:08 +01:00
Ellis Kenyo
249a39acb4
fix(format): pin apheleia 2023-09-13 20:21:07 +01:00
Ellis Kenyo
12d520a377
fix(format): remove merged formatter 2023-09-13 20:21:07 +01:00
Ellis Kenyo
b0e579741e
fix(format): react to ns change 2023-09-13 20:21:07 +01:00
Ellis Kenyo
550767efe2
fix(format): apheleia-inhibit-functions after load 2023-09-13 20:21:07 +01:00
Ellis Kenyo
b34533de96
fix(format): load format-on-save-disabled-modes fn
Should handle some corner cases with how inhibiting is set
2023-09-13 20:21:07 +01:00
Ellis Kenyő
926b8f1328
docs(format): redo docs to handle refactor 2023-09-13 20:21:07 +01:00
Ellis Kenyő
457aeeccc0
fix(format): better handle format-on-save disable 2023-09-13 20:21:07 +01:00
Ellis Kenyő
dc3b5c3710
fix(format): handle git-gutter nicely 2023-09-13 20:21:01 +01:00
Ellis Kenyő
cd79edf134
feat(format): add :lang emacs-lisp formatter
Introduce a formatter function for emacs-lisp (tracked upstream here
[1]) that tries to preserve as much of what the user wants as possible

[1]: https://github.com/radian-software/apheleia/pull/102
2023-09-13 20:20:58 +01:00
Ellis Kenyő
3aa9796b84
fix(format): resolve list expansion issues
The argument list was being expanded incorrectly, this should now be resolved.
2023-09-13 20:20:58 +01:00
Ellis Kenyő
4ecd616cd8
refactor(format): replace with apheleia
Initial refactor of format module to replace format-all with apheleia
2023-09-13 20:19:59 +01:00
Colin Woodbury
20cdba39a8 fix(evil): more reliable window detection
At some point `windmove-find-other-window` stopped loading reliably,
such that `SPC w H` would complain of a missing symbol. Indeed
navigating to the implementation of `windmove` within Emacs's Lisp we
find warnings that it has mostly been superceded by newer window APIs
since 2013, and is implemented in terms of `window-in-direction`.

By using `window-in-direction` directly, the loading problem disappears.
2023-09-12 21:20:23 +02:00
Henrik Lissner
bef076b655
bump: :editor evil
emacs-evil/evil@9eb69b7f5b -> emacs-evil/evil@5fc16776c5
emacs-evil/evil-collection@1ad283f5b7 -> emacs-evil/evil-collection@8be4b75c86

- Fixes breaking change due to emacs-mirror/emacs@802a54ad62 (see
  #7397).

Ref: debbugs.gnu.org/cgi/bugreport.cgi?bug=62248
Close: #7397
Co-authored-by: prashantvithani <prashantvithani@users.noreply.github.com>
2023-09-09 23:59:22 +02:00
Amos Bird
ca9f84d664
fix(evil): add evil-embrace support for c++-ts-mode
In emacs-29, native tree-sitter adds new major modes for the C++
language, named c++-ts-mode. As a result, hooks in c++-mode will not
run. This commit adds the angle bracket fix hook for c++-ts-mode.
2023-09-09 23:59:06 +02:00
Henrik Lissner
56187fc35a
merge: pull request #7359 from theschmocker/snippet-command-fixes-and-enhancements 2023-09-08 23:24:48 +02:00
Lorenzo Ravaglia
25602409b6
refactor(file-templates): c++-mode/__main.cpp: modernize
- Drops `using namespace std`: a known anti-pattern which imports a
  massive namespace into the global namespace. See
  https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
- Modernizes/generalizes `main`'s signature with a trailing return
  type (C++11)

Ref: https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
Close: #7387
2023-09-07 20:22:58 +02:00
Lorenzo Ravaglia
9cc9351cae
feat(file-templates): add c-mode/__main.c
Ref: #7387
2023-09-07 20:22:58 +02:00
Liam Hupfer
9c2d50d97e nit: fix docstrings 2023-09-02 11:46:07 -05:00
Henrik Lissner
9e9c7d9e6d
bump: :editor evil
edkolev/evil-lion@a55eb64742 -> edkolev/evil-lion@1e838a53b8
emacs-evil/evil@60ba716bf5 -> emacs-evil/evil@9eb69b7f5b
hlissner/evil-snipe@c07788c35c -> hlissner/evil-snipe@c2108d3932
mamapanda/evil-traces@d4c53bd6ad -> mamapanda/evil-traces@82e8a7b421

- Includes two fixes for breaking changes in evil:
  - mamapanda/evil-traces#5 (due to breaking changes in evil-ex.el)
  - emacs-evil/evil#1824 (due to removal of evil-unquote function)

Fix: mamapanda/evil-traces#5
Fix: emacs-evil/evil#1824
2023-08-21 18:09:02 +02:00
Henrik Lissner
21df7d0beb
bump: :editor evil
cute-jumper/evil-embrace.el@7b5a539cfe -> cute-jumper/evil-embrace.el@3081d37811
emacs-evil/evil-collection@aaf3e0038e -> emacs-evil/evil-collection@1ad283f5b7
emacs-evil/evil-surround@f273821f57 -> emacs-evil/evil-surround@8fad8540c4
emacs-evil/evil@2ce03d412c -> emacs-evil/evil@60ba716bf5
mamapanda/evil-traces@290b532354 -> mamapanda/evil-traces@d4c53bd6ad
redguardtoo/evil-nerd-commenter@8c0f23d46a -> redguardtoo/evil-nerd-commenter@3b197a2b55

Ref: mamapanda/evil-traces#5
Ref: cute-jumper/evil-embrace.el#10
2023-08-20 22:16:12 +02:00
theschmocker
406594b9af refactor(snippets): use cond instead of nested if 2023-08-19 21:59:48 -05:00
theschmocker
363706744d feat(snippets): select mode for new snippet
When there are extra yasnippet modes loaded in the current buffer,
prompt user to select one for the new snippet.

If a prefix arg is supplied when calling `+snippets/new`, prompt user to
select any mode.
2023-08-19 21:49:51 -05:00
theschmocker
4643376268 fix(snippets): fix +snippets/new and +snippets/new-alias file creation
When adding a snippet/alias to a mode for the first time, setting
`default-directory` before calling `+snippet--ensure-dir` would cause an
error due to the directory not existing. As a fix, return the dir from
`+snippet--ensure-dir` and bind `default-directory` to that.

Additionally, not having a file associated with the buffer caused issues
with loading the snippet after using snippet-mode's C-c C-c binding,
especially when other directories were added to yasnippet's load paths.
As a solution for this, prompt the user for a snippet key and set the
buffer's file name to it within the snippet dir. If an existing file
would be overwritten, ask user for confirmation. As an additional
convenience, set the snippet's key field to the entered value.

Finally, replace %alias with doom-snippets-expand in the generated alias
snippets. Not aware of any history here, but %alias did not work for me.
2023-08-19 21:49:11 -05:00
theschmocker
41f31ba9ce fix(snippets): fix snippet uuid completion
Rather than attempting to read the uuid from a text property on the
selected completion -- which gets stripped by vertico (and possibly
helm) -- grab it from a lookup alist of completion-candidat->uuid.

Essentially the same as the proposed implementation by @jgrey4296
on #4127

Fix: #4127
2023-08-19 21:00:15 -05:00
Daanturo
23c0eeba45 fix(multiple-cursors): check evil-local-mode instead of the global one
For evil compatibility (switching to emacs state during multiple
cursors), when evil is enabled locally by evil-local-mode but not
globally by evil-mode, using the former to check is more accurate.

Also make the state variables local since MC maybe used for multiple
buffers: activate current buffer and while not deactivating here, go to
another buffer and activate there.
2023-08-18 19:20:45 +02:00
Christian Packard
0d30ef188a
docs(lispy): add "Working with Brackets" 2023-07-24 23:22:32 +02:00
Ellis Kenyo
435a383635 fix(evil): remap after eglot is loaded
evil-collection recently made some changes that map over our defaults
for evil
2023-07-22 16:41:13 +02:00
Henrik Lissner
cb6b065b87
fix(evil): embrace: escaped pairs in first org buffer
Close: #5423
2023-03-22 01:16:02 -04:00
Colin Woodbury
e1c962cdf9 fix(parinfer): activate for fennel-mode
A simple oversight.
2023-03-20 18:29:52 -04:00
Henrik Lissner
adb125f41f
fix(evil): persist evil state after mode changes
For example: when doom-guess-mode-h is triggered (see #7141), or when
the user invokes a mode function through M-x.

Fix: #7141
2023-03-11 10:54:22 -05:00
Henrik Lissner
fe2cb5e705
fix(evil): premature "too early" warnings
A warning gets logged if a lazily-loaded evil-collection package is
loaded too early at startup, but the goal posts were in the wrong place,
resulting in unavoidable warnings for packages that weren't actually
loaded too early.
2023-02-25 20:47:28 -05:00
Henrik Lissner
f348856cd3
docs(evil): add faq for kill-ring and clipboard sync
Describes how to disable synchronization between the kill-ring and
system clipboard.

Close: #6947
Co-authored-by: rittelle <rittelle@users.noreply.github.com>
2023-02-23 20:44:48 -05:00
Henrik Lissner
802f015f26
fix(file-templates): org-capture errors on new files
If an org-capture template generates a new, blank file, Doom steps in to
insert a yasnippet file-template into the buffer.  If the file template
has text fields, it leaves the new buffer in an "editing snippets"
state (and insert mode) which causes errors downstream when org-capture
tries to modify the buffer.

The file-templates module employs some heuristics to prevent false
positives like these, but packages (and org-capture) can get around this
by simply generating and switching to the org buffer before modifying
it. This commit no-ops file-template expansion in any org-capture
session, which should resolve these issues.

Fix: #6160
Fix: #6741
2023-02-22 20:47:51 -05:00
Henrik Lissner
1040dd45b6
bump: :editor
abo-abo/auto-yasnippet@db9e0dd433 -> abo-abo/auto-yasnippet@6a9e406d0d
abo-abo/lispy@df1b7e614f -> abo-abo/lispy@097dd66e66
doomemacs/snippets@2d031f7231 -> doomemacs/snippets@fe4003014a
emacs-tree-sitter/ts-fold@01d6485398 -> emacs-tree-sitter/ts-fold@9d9e0c5cf7
emacsorphanage/god-mode@49c1a17531 -> emacsorphanage/god-mode@607aff10a7
joostkremers/visual-fill-column@453d698d7f -> joostkremers/visual-fill-column@695a597892
justinbarclay/parinfer-rust-mode@c2c1bbec6c -> justinbarclay/parinfer-rust-mode@332c7f4742
magnars/multiple-cursors.el@aae47aebc0 -> magnars/multiple-cursors.el@16223efc2d
noctuid/lispyville@9c14bed035 -> noctuid/lispyville@14ee8711d5
2023-02-21 19:34:42 -05:00
Henrik Lissner
bd5d43df95
bump: :editor evil
emacs-evil/evil-collection@665d5c99e2 -> emacs-evil/evil-collection@aaf3e0038e
emacs-evil/evil-surround@c9e1449bf3 -> emacs-evil/evil-surround@f273821f57
emacs-evil/evil@26ec0cda1b -> emacs-evil/evil@2ce03d412c
redguardtoo/evil-nerd-commenter@b1a92221c9 -> redguardtoo/evil-nerd-commenter@8c0f23d46a
2023-02-18 15:27:49 -05:00
Henrik Lissner
33db882ae6
feat(word-wrap): add soft-wrapping at fill-column
Using visual-fill-column.

Close: #1906
Co-authored-by: flatwhatson <flatwhatson@users.noreply.github.com>~
2023-02-18 15:27:47 -05:00
p4v4n
aa079b0e3c
fix(god): remove hard coding of cursor color 2023-02-18 00:47:35 -05:00
Ta Quang Trung
acdd0a4865
fix(fold): set ts-fold-replacement-face fg to unspecified 2023-02-17 11:45:06 -05:00
Akhil Wali
d5ccac5d71 bump: :editor god
emacsorphanage/god-mode@fac7d26ecd -> emacsorphanage/god-mode@49c1a17531
2022-12-02 00:36:06 +01:00
Akhil Wali
b7efac8b9e fix(god): enable god-mode on init
Enabling god-mode was broken in 7a2be67.

Fix: #6954
Amend: 7a2be67efa
2022-12-02 00:36:06 +01:00
Layerex
5b2ea8c32f feat(file-templates): Add javascript "use strict" file template 2022-10-29 02:52:01 +02:00
Layerex
76caca0eaa feat(file-templates): Add javascript shebang file template 2022-10-29 02:52:01 +02:00
Henrik Lissner
a0ccb6b95b
feat(emacs-lisp,lispy): recognize ;;* outline headings
Permit `;;* ...` be recognized by imenu and outline-minor-mode (and
outline's commands). This also patches Lispy to reflect this new
configuration (if :lang emacs-lisp is active).

Close: #6732
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2022-10-29 01:57:43 +02:00
TEC
5ac2a5258b docs: change link format 2022-10-05 01:01:19 +02:00
Henrik Lissner
f9201eb218
refactor: introduce doom-context
Introduces a system to announce what execution contexts are active, so I
can react appropriately, emit more helpful logs/warnings in the case of
issues, and throw more meaningful errors.

* bin/doom: load module CLIs in the 'modules' context.
* lisp/cli/doctor.el: load package files in 'packages' context.
* lisp/doom-cli.el:
  - (doom-before-init-hook, doom-after-init-hook): trigger hooks at the
    correct time. This may increase startup load time, as the benchmark
    now times more of the startup process.
  - (doom-cli-execute, doom-cli-context-execute,
    doom-cli-context-restore, doom-cli-context-parse,
    doom-cli--output-benchmark-h, doom-cli-call, doom-cli--restart,
    doom-cli-load, run!): remove redundant context prefix in debug logs,
    it's now redundant with doom-context, which doom-log now prefixes
    them with.
* lisp/doom-lib.el (doom-log): prefix doom-context to doom-log output,
  unless it starts with :.
* lisp/doom-packages.el (package!, doom-packages--read): throw error if
  not used in a packages.el file or in the context of our package
  manager.
* lisp/doom-profiles.el (doom-profile--generate-init-vars,
  doom-profile--generate-load-modules): use modules doom-context instead
  of doom-init-time to detect startup.
* lisp/doom-start.el (doom-load-packages-incrementally-h): move function
  closer to end of doom-after-init-hook.
* lisp/doom.el:
  - (doom-before-init-hook, doom--set-initial-values-h,
    doom--begin-init-h): rename doom--set-initial-values-h to
    doom--begin-init-h and ensure it runs as late in
    doom-before-init-hook as possible, as that is the point where Doom's
    "initialization" formally begins.
  - (doom-after-init-hook): don't trigger at the end of command-line-1
    in non-interactive sessions. This will be triggered manually in
    doom-cli.el's run!.
* lisp/lib/config.el (doom/reload, doom/reload-autoloads,
  doom/reload-env): use 'reload' context for reload commands.
* modules/lang/emacs-lisp/autoload.el (+emacs-lisp-eval): use 'eval'
  context.
* modules/lang/org/config.el: remove doom-reloading-p; check for
  'reload' doom context instead.
2022-09-24 22:09:05 +02:00
Henrik Lissner
732d87ac3e
nit: minor comment revision and refactors 2022-09-16 17:01:57 +02:00
Henrik Lissner
7ffe0df8eb
bump: :editor evil
edkolev/evil-lion@4da660e124 -> edkolev/evil-lion@a55eb64742
emacs-evil/evil-collection@6cc02b238c -> emacs-evil/evil-collection@665d5c99e2
emacs-evil/evil@157af04d2c -> emacs-evil/evil@26ec0cda1b
redguardtoo/evil-nerd-commenter@386cd758a4 -> redguardtoo/evil-nerd-commenter@b1a92221c9
2022-09-16 17:01:57 +02:00