Commit graph

12362 commits

Author SHA1 Message Date
Luigi Sartor Piucco
0588b42b46
feat(corfu,vertico): use equal orderless config
This removes the old `&` separator for Vertico (does anyone use that
instead of just space?) in favor of escapable space and unifies
orderless config with Corfu. Also implements smart separator
insert/escape/reset on `C-SPC`

Co-authored-by: Liam Hupfer <liam@hpfr.net>
2024-03-19 20:41:50 -03:00
StrawberryTea
365a95de76
feat(corfu): more CAPFs and ergonomy changes
Add CAPFs from cape:
- `cape-dabbrev`;
- `cape-elisp-block`;
- `cape-file`;
Fix some CAPFs via cape:
- Make non-exclusive, purified and silent `pcomplete-completions-at-point`;
- Make non-exclusive and non-interruptable `lsp-completion-at-point`;
- Make non-exclusive `eglot-completion-at-point`;
- Make non-exclusive `comint-completion-at-point`;
Fix and improve keybindings:
- Smart `DEL`;
Add depth to CAPFs, allowing ordering to be adjustable.
2024-03-19 20:41:50 -03:00
Luigi Sartor Piucco
968a897530
feat(corfu): add snippets
Yasnippet is now properly integrated! A previosly-unset default has now
been given to `corfu-on-exact-match`. With snippets, it causes immediate
expansion upon single match by default, so we set it to nil and
recommend against changing it in the README.
2024-03-19 20:41:50 -03:00
Luigi Sartor Piucco
6949451b00
module: add :completion corfu
This commit's primary goal is allowing use of
[Corfu](https://github.com/minad/corfu) as an alternative to
[Company](https://github.com/company-mode/company-mode). It introduces a
module under `:completion` for this purpose, plus some conditionals on
other relevant modules to toggle functionality like lsp back-ends and
[Cape](https://github.com/minad/cape) capfs for certain modes.

Other optional or miscellaneous features include:

- Corfu is enabled in the minibuffer if `completion-at-point` is bound;
- Support for displaying the completion's documentation on a secondary
  popup;
- Support for terminal display if :os tty;
- Support for icons if +icons;
2024-03-19 20:41:36 -03:00
d0a66003e8 dev: updating from latest 2024-03-14 11:07:30 -04:00
Sean Farley
85ce866953 feat(macos): osx-trash is only needed by emacs < 29 2024-03-14 06:13:38 -04:00
1f966c2250 dev: updating from latest 2024-03-13 12:16:01 -04:00
87daad531e dev: merge branch 'pr7002' into emenel 2024-03-13 10:57:38 -04:00
Henrik Lissner
5280fb2855
fix(lsp): void-variable eglot-events-buffer-config
The variable was modified too early (before the package was loaded).

Amend: 5f858bb142
2024-03-13 06:51:35 -04:00
Henrik Lissner
193475cd64
fix(lsp): s/eglot-events-buffer-size/eglot-events-buffer-config/
Amend: 5f858bb142
2024-03-13 01:09:47 -04:00
Henrik Lissner
0073c3d70d
docs(twitter): add deprecation notice
twittering-mode is non-functional and no known alternative exists.

Close: #6383
2024-03-13 01:00:39 -04:00
Henrik Lissner
39db5de570
fix(org): only reveal point on save-place-after-find-file-hook
Prior to this change, whenever you enter an org-mode buffer, any
invisible regions around the cursor (which had been moved by save-place)
would be unfolded unconditionally. There may be cases where moving
the cursor immediately after visiting the file could cause errors (e.g.
when yasnippet tries to wrestle control over the cursor,
org-agenda-switch-to moves the cursor before switching to the buffer,
etc).

This change ensures the expansion *only* happens when save-place does
its thing (and successfully).
2024-03-13 01:00:38 -04:00
Henrik Lissner
5cc4056abf
fix(format): +format-with-eglot-fn: eglot detection 2024-03-13 01:00:38 -04:00
Henrik Lissner
5f858bb142
refactor(lsp): obsolete eglot-events-buffer-size
Ref: 88c46bd4db
2024-03-13 01:00:38 -04:00
Henrik Lissner
4af536cde2
fix(emacs-lisp): +emacs-lisp--module-at-point: wrong-number-of-arguments error 2024-03-13 01:00:38 -04:00
Henrik Lissner
90f90fb34d
fix(treemacs): simplify lsp-treemacs load-order
dec058f fixed the load order between treemacs-nerd-icons and
lsp-treemacs, but lsp-treemacs still loads so late that folks will see a
theme-less Treemacs until they visit their first lsp-mode-enabled file.
This ensures that won't happen.

Amend: dec058fabb
Amend: #7519
2024-03-13 01:00:38 -04:00
cuithon
f838c1790d
docs(default,mu4e,latex): fix repetition of the in docs 2024-03-12 20:16:29 -04:00
Luigi Sartor Piucco
600ebf8b01
docs(corfu): add @LemonBreezes as co-maintainer
Co-authored-by: StrawberryTea <look@strawberrytea.xyz>
2024-03-12 18:18:34 -03:00
Luigi Sartor Piucco
9e7967c909
refactor(corfu): settings and keybinding overhaul
Previously, a distinction was made only between "regular" style (assumed
to be for people who prefer to cycle directionally and commit with RET)
and +tng (assumed to be for people who prefer TAB and auto-commit). This
made composing further variations harder on the user, as they would have
to work around our bindings. Now we have many features as documentation,
and the user can compose to their liking. The global CAPF list was
pruned, suggesting to use individual keys for those functions if
required.
2024-03-12 18:18:33 -03:00
StrawberryTea
3aa1ea74d9
feat(corfu): make minibuffer completion optional 2024-03-12 18:18:33 -03:00
StrawberryTea
5ea726cfe4
feat(config): modify smart-ret in +tng minibuffer
If we are using +tng, we can make RET always exit the minibuffer. This
has the downside of not being able to insert snippets, but no one writes
snippets for the minibuffer anyway.
2024-03-12 18:18:33 -03:00
StrawberryTea
89a30df0c4
fix(corfu): eval lambdas 2024-03-12 18:18:33 -03:00
StrawberryTea
d0127025a0
fix(corfu): improve detection of comments
Due to https://github.com/minad/cape/pull/109, we cannot rely on only
faces to detect comments.
2024-03-12 18:18:33 -03:00
StrawberryTea
b96778497b
fix(corfu): use :filter instead of :enable 2024-03-12 18:18:32 -03:00
StrawberryTea
a1ba1593fc
fix(corfu): complete after colon in lispy 2024-03-12 18:18:32 -03:00
StrawberryTea
14f350a3da
fix(corfu): move orderless conf out of corfu block 2024-03-12 18:18:32 -03:00
StrawberryTea
16c4daee52
feat(config): add smart-ret for corfu
This commit makes RET in Corfu quit auto-completion and passthrough to
the underlying keymap if no completion is selected.
2024-03-12 18:18:32 -03:00
StrawberryTea
881c45bd05
doc(corfu): document +corfu-want-C-x-bindings 2024-03-12 18:18:32 -03:00
StrawberryTea
d25e15072d
fix(corfu): bind tng tab commands to insert state
These commands were being shadowed by the other Corfu commands
previously.
2024-03-12 18:18:31 -03:00
StrawberryTea
fa1979d97f
feat(config): make C-x corfu bindings optional
For someone like me that uses the vanilla emacs commands bound to C-x
C-p, C-x C-n, etc, I prefer to set the completion keybindings manually.
2024-03-12 18:18:31 -03:00
StrawberryTea
42f48ace69
fix(corfu): bind cape-dabbrev eagerly
Set up cape-dabbrev in completion-at-point-functions before dabbrev is
loaded.
2024-03-12 18:18:31 -03:00
StrawberryTea
f3729174bd
feat(corfu): update minibuffer hints manually
In the scenario where we exit the minibuffer using C-RET or S-RET, we
need this advice to ensure that visual hints are updated before exiting.
2024-03-12 18:18:31 -03:00
StrawberryTea
0ea6968f74
refactor(corfu): unwrap add-hook from after! block
add-hook handles void variables so there is no need to wrap it in an
after! block. This also makes it easier for the user to remove the hook.
2024-03-12 18:18:31 -03:00
StrawberryTea
b54c64bc21
fix(corfu): load minibuffer-setup-hook earlier
This way Corfu can be lazily-loaded by the minibuffer-setup-hook.
2024-03-12 18:18:31 -03:00
Luigi Sartor Piucco
a2e76be3a9
bump: :completion corfu
minad/corfu@24dccafeea -> minad/corfu@b48d3017a4
minad/cape@18a30f48bb -> minad/cape@bfde79ed44
elken/yasnippet-capf@a0a6b1c2bb -> elken/yasnippet-capf@db12b55cd0
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
956b85310c
feat(corfu): general move-to-minibuffer impl
We previously implemented only consult/vertico as a target for export,
now we have all of them. It was necessary to use case-by-case
conditions, unfortunately, because other UIs have subtle quirks that
prevent a single generalized approach to work.

Ivy is almost compliant, but it needs beg and end to not be markers.

Helm doesn't replace `completion-in-region-function`, it expects to go
around the default `completion--in-region`, so a small addition was made
to its module, because we weren't doing that. This was likely an
oversight due to the non-standard usage. This was fixed here because we
need it working for this feature.

Ido doesn't implement `completion-in-region` and its `completing-read`
is retricted to a list of strings as table, so it's treated the same as
absence of a framework, because it lacks the needed features.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
d666dcd713
feat(corfu): impl smart confirm in minibuffer
An issue when using corfu in the minibuffer was the need for pressing
RET twice, since the first only inserts the completion. This commit
aliviates that by providing C-RET to ignore completion and conclude the
minibuffer imediately and S-RET to insert completion then conclude.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
7bbef94854
fix(corfu): move binds to :config default
Bindings were moved to the `:config default` module and some keys were
adjusted to match Company/other modules. The changes were documented in
the README.
2024-03-12 18:18:30 -03:00
Luigi Sartor Piucco
8ef4ce6311
feat(corfu,vertico): use equal orderless config
This removes the old `&` separator for Vertico (does anyone use that
instead of just space?) in favor of escapable space and unifies
orderless config with Corfu. Also implements smart separator
insert/escape/reset on `C-SPC`

Co-authored-by: Liam Hupfer <liam@hpfr.net>
2024-03-12 18:18:30 -03:00
StrawberryTea
948f2b7705
feat(corfu): more CAPFs and ergonomy changes
Add various CAPFs from cape:
- `cape-dabbrev`;
- `cape-emoji`;
- `cape-dict`;
Fixed some CAPFs via cape:
- Make non-exclusive, purified and silent `pcomplete-completions-at-point`;
- Make non-exclusive and non-interruptable `lsp-completion-at-point`;
- Make non-exclusive `eglot-completion-at-point`;
- Make non-exclusive `comint-completion-at-point`;
Fix and improve keybindings:
- Smart `DEL`/`backspace` for `+tng`;
- Smart `RET`;
Add depth to CAPFs, allowing ordering to be adjustable.
Enable in minibuffer.
2024-03-12 18:18:29 -03:00
Luigi Sartor Piucco
8ed223c98e
feat(corfu): add snippets
Yasnippet is now properly integrated! A previosly-unset default has now
been given to `corfu-on-exact-match`. With snippets, it causes immediate
expansion upon single match by default, so we set it to nil and
recommend against changing it in the README.
2024-03-12 18:18:29 -03:00
Luigi Sartor Piucco
5532c68e53
module: add :completion corfu
This commit's primary goal is allowing use of
[minad/corfu](https://github.com/minad/corfu) as an alternative to
[company](https://github.com/company-mode/company-mode). It introduces a
module under :completion for this purpose, plus some conditionals on
other relevant modules to toggle functionality like lsp back-ends and
[minad/cape](https://github.com/minad/cape) capfs for certain modes.

Other optional or miscellaneous features include:

- Support for displaying the completion's documentation on a secondary
  popup;
- Support for terminal display if :os tty;
- Support for icons if +icons;
- Support for tab-and-go completion if +tng;
2024-03-12 18:18:29 -03:00
StrawberryTea
a0344ffc3a
fix(mu4e): advice for new mu4e release
mu4e-quit now takes an optional argument, BURY, which is a boolean that
determines whether to bury the buffer or kill it. This commit updates
the advice to reflect this change.
2024-03-11 04:01:48 -04:00
Henrik Lissner
68682ac012
fix(ruby): ruby REPL w/ robe
set-repl-handler! handlers have to return a buffer.

Close: #7450
Co-authored-by: Zetagon <Zetagon@users.noreply.github.com>
2024-03-11 03:59:37 -04:00
Henrik Lissner
1db96a1fdb
docs(web): correct type, mention JS comment hack, remove superfluous notice
close: #7388
2024-03-11 03:59:37 -04:00
Tim Ruffing
e27d9b35d3 fix(popup): fix finding of major side window
Fix: #7647
Amend: #7598
2024-03-11 02:55:38 -04:00
Henrik Lissner
6c1aa0fb62
bump: :tools editorconfig
editorconfig/editorconfig-emacs@4b81a59928 -> editorconfig/editorconfig-emacs@c3666c093f
2024-03-11 00:53:44 -04:00
Henrik Lissner
dec058fabb
fix(treemacs): treemacs-nerd-icons load order w/ +lsp
lsp-treemacs changes the default Treemacs theme, so treemacs-nerd-icons
needs to be loaded after it, if it's installed/enabled.

Fix: #7519
Fix: doomemacs/themes#801
Ref: emacs-lsp/lsp-treemacs#89
2024-03-11 00:53:44 -04:00
Henrik Lissner
41e81f67a7
refactor(editorconfig): remove unused advice
editorconfig-call-editorconfig-exec was renamed+redesigned upstream. The
advice can no longer be trivially repurposed, so I'm removing it.

Ref: editorconfig/editorconfig-emacs@f8f1a899df
2024-03-11 00:53:44 -04:00
Henrik Lissner
43870bf831
fix(editorconfig): prevent changes to tab-width in org-mode
- Add another measure for preventing changes to tab-width in org-mode.
  The hook introduced in 2757a97 runs too early and could be overwritten
  by editorconfig.
- Fix the hook in 2757a97 to run much later, ensuring (as a last resort)
  no other packages can overwrite tab-width either.

Amend: 2757a97a30
Ref: #7670
2024-03-11 00:53:44 -04:00