Commit graph

64 commits

Author SHA1 Message Date
Henrik Lissner
aa54383b5d
refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02:00
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
0cb8d1416f bump: :tools lsp
emacs-lsp/lsp-mode@41173dca4d -> emacs-lsp/lsp-mode@3d6a01dde9
joaotavora/eglot@55c13a9137 -> joaotavora/eglot@28092ba3af

Ref: #5904
Fix: #5927
Close: #5928
Close: #5933
Close: #5945
2022-01-03 16:51:51 +01:00
Henrik Lissner
d981447674 fix(lsp): add popup rule for *lsp-install* buffers 2021-12-02 04:13:15 +01:00
Miko Nieminen
36d41b600a
fix(lsp): move lsp-session to doom cache dir (#5650)
Because this data contains cached session data, it makes more sense to
have it under `~/.emacs.d/.local/cache` so that it is clear that it can
and should be removed when debugging and testing LSP using modules.

Fix #5649
2021-10-18 01:38:20 +02:00
Henrik Lissner
541cd1a58d tweak(lsp): lsp-ui-doc-{delay,max-width}
- Wider lsp-ui-doc frames.
- Slightly longer delay before lsp-ui-doc appears (was too naggy
  before).
2021-10-03 12:08:42 +02:00
Henrik Lissner
fb34b5e24c tweak(lsp): lsp-ui-doc-enable = t
This was temporarily disabled due to tremendous slowness on PGTK
clients, which was hopefully addressed in 731ae806e, so we can renable
this.

Fix #5533
2021-09-30 15:06:34 +02:00
Itai Y. Efrat
a10ac0e609 feat(lsp,vertico): remap xref-find-apropos to...
...consult-lsp-symbols
2021-09-14 20:44:55 +03:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
77f78f0df3 revert: Fix #5215: mix snippets with completion candidates
The sorting of these two backends are counter-intuitive in this
configuration, but I don't want to place the snippets in front of the
more meaningful capf results as suggested in #5215. A better solution is
needed, but for the time being this will do.

Fix #5262
Ref #5215
Revert ba716d69f0
2021-08-03 23:02:11 -04:00
Daanturo
829a44f79c Quickly close the lsp-signature popup by ESC*
Add to `doom-escape-hook` a function that closes the displayed LSP
signature.
2021-07-29 08:59:48 +07:00
Henrik Lissner
480f99c207
Merge pull request #4961 from gagbo/patch-10
Feature-gate :tools lsp company-specific hooks
2021-07-24 18:30:35 -04:00
Henrik Lissner
edc527bb26 tools/lsp: add lsp-racket to lsp-client-packages
Should be PRed upstream.
2021-07-12 20:15:29 -04:00
Henrik Lissner
ba716d69f0 Fix #5125: mix snippets with completion candidates
So snippets aren't all the way at the bottom of the candidate list.

Closes #5220
2021-07-09 13:25:14 -04:00
Cora Sutton
7925759b8e
Set the lsp-ui-sideline-actions-icon to the default
When Emacs 26.x support was in place this was originally:

```elisp
lsp-ui-sideline-actions-icon (if EMACS27+ lsp-ui-sideline-actions-icon-default)
```

But when it was removed it became:

```elisp
lsp-ui-sideline-actions-icon t
```

The docs for lsp-ui-sideline-actions-icon say:

```
Image file for actions.  It must be a png file.
```

Setting this to `t` results in a whole lot of these messages:

```
[lsp-ui-sideline]: Error with actions icon: (error Invalid image specification)
```

So the solution seems to me to be to set it to:

```elisp
lsp-ui-sideline-actions-icon lsp-ui-sideline-actions-icon-default
```

I've set it in my emacs and it seems to work.
2021-07-06 13:46:53 -05:00
Henrik Lissner
044a1a5f2b Drop Emacs 26.x support
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).

With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.

Also reverts bb677cf7a (#5232) as it is no longer needed.
2021-07-06 02:31:52 -04:00
Henrik Lissner
3a0bf17f2f lsp-ui-doc-enable = nil
Disabling this by default until emacs-lsp/lsp-ui#613 is addressed.
2021-05-23 22:09:07 -04:00
Sam Whitlock
01b3e1d8d8
Noting the lsp-peek handlers as :async
Without this, subsequent handlers registered (e.g. those from other
completion frameworks) will also pop up in addition to the peek UI.
This creates UI lock-up and is generally undesired.
2021-05-20 20:29:08 +02:00
Henrik Lissner
69bd3da195 Don't enable lsp-ui-mode in lsp--auto-configure
Using a hook instead is more sensible (users can trivially configure
it).
2021-05-18 01:06:15 -04:00
Henrik Lissner
d141f39ee7 tools/lsp: remove unneeded lsp-ui-*-enable checks 2021-05-18 00:05:15 -04:00
Henrik Lissner
e2077c823a tools/lsp: minor refactor
And several updates necessary for ff3c9777e.
2021-05-16 21:17:16 -04:00
Eric Dallo
c224e2e771
Move to global-mode-string 2021-05-15 18:30:59 -03:00
Gerry Agbobada
fda382cc86
Feature-gate :tools lsp company-specific hooks
As I’m trying to use [corfu](https://github.com/minad/corfu) for a bit, I found out that this hook prevents lsp-mode from starting if company-mode isn’t used.
2021-05-01 13:03:07 +02:00
Yiming Chen
00de463d10 Indicate that lsp-find-implementation is async as well
- this fixes an issue that when there are multiple implementations, jump
  to one implementation that's in another file fails
2021-04-17 08:54:50 +08:00
Yiming Chen
6563e89bda Indicate that lsp-describe-thing-at-point is async
- otherwise, `+lookup-online-backend-fn` would be called as well
- lsp-describe-thing-at-point was marked as not async in
  d4eb7e31ac
- but `lsp-describe-thing-at-point` calls `lsp--make-request`
  internally (which is async I assume):
  eda51c2166/lsp-mode.el (L4677)
2021-04-17 07:58:50 +08:00
Henrik Lissner
c77cebfef8 Remove trailing slash on lsp-server-install-dir
Fixes some issues with lsp-mode's downloader resolving paths to
downloaded assets. For example, lua-language-server fails to download
when lsp-server-install-dir has a trailing slash (see #4846).

Fix #4846
2021-04-15 01:22:07 -04:00
Henrik Lissner
241e040e4d tools/lsp: remove redundant lsp-clients-lua-language-server-bin
This was already upstreamed.
2021-04-14 23:43:45 -04:00
Henrik Lissner
d4eb7e31ac Fix #4771: give lsp-find-* precedence over fallbacks
LSP lookup handlers should have the highest precedence, but this wasn't
the case due to a regression in 430d628.
2021-03-27 21:45:19 -04:00
Henrik Lissner
e4c4e3f48c Move lsp-intelephense-storage-path to doom-etc-dir
Longer-lived files should live in doom-etc-dir, not doom-cache-dir.
2021-03-27 18:27:19 -04:00
Sævar Berg
12cf59cf73
Prioritize company-capf over company-yasnippet
This ensures that when doing things like completing on `this.` inside classes, the class fields and methods are shown before the yasnippet snippets.
2021-03-08 13:29:28 +01:00
Henrik Lissner
cb194a31b1
Merge pull request #4512 from jsravn/enable-yasnippet-in-lsp-completion
Include snippets in lsp completion
2021-03-05 23:21:07 -05:00
Henrik Lissner
7afe5dc5c3 tools/lsp: fix void-function lsp--require-packages error 2021-03-05 20:09:22 -05:00
Henrik Lissner
430d628b00 tools/lsp: use xref backend as lookup handler
If lsp-find-{definition,references} fails, it will properly fall through
to other lookup handlers (like dumb-jump).

Fix #4662
Fix #4739
2021-03-05 20:09:22 -05:00
Henrik Lissner
de924daf47 Fix #4704: invalid image spec error from lsp-ui
Regression from a3f242d
2021-02-27 10:31:49 -05:00
Henrik Lissner
a3f242d4b6 tools/lsp: only enable sideline icons in 27.x+ 2021-02-25 13:59:43 -05:00
Henrik Lissner
cd083bc059 tools/lsp: fix +lsp-prompt-to-install-server == 'quiet
Wasn't suppressing output because inhibit-message is overridden in
lsp--message.
2021-02-25 12:40:07 -05:00
Henrik Lissner
7f6bcb8616 tools/lsp: allow +lsp-prompt-to-install-server = 'quiet 2021-02-24 18:06:30 -05:00
Henrik Lissner
95a603733a Add +lsp-prompt-to-install-server option
If nil, LSP will quietly fail if no LSP server is available instead of
pestering the user to install a server.
2021-02-05 21:53:06 -05:00
James Ravn
573d14c264
Include snippets in lsp completion
This gives completion of snippets along with normal LSP completion,
similar to how the old company-lsp backend worked.
2021-01-07 11:19:03 +00:00
Henrik Lissner
70e71f3f6d
lsp-headerline-breadcrumb-enable = nil 2021-01-07 01:41:58 -05:00
Henrik Lissner
2849efdf2e
lang/lua: update README & refactor
Mentioned in #4462
2021-01-03 17:07:42 -05:00
Henrik Lissner
b857566239
Minor refactors 2020-10-20 16:52:39 -04:00
Henrik Lissner
88b42caab0
Fix user-defined flycheck-checker in lsp-mode 2020-10-20 16:51:39 -04:00
Henrik Lissner
8297af01a8
tools/lsp: tweak lsp-ui-doc defaults 2020-10-14 18:38:09 -04:00
Henrik Lissner
2491c8ed2c
tools/lsp: add j/k/C-j/C-k keys for lsp-ui-peek 2020-10-14 18:38:05 -04:00
Henrik Lissner
c80d546e55
Don't prompt to kill lsp server on cleanup 2020-10-12 17:36:02 -04:00
Henrik Lissner
ebc1e7092d
tools/lsp: restore flycheck-checker fix #3989
Removed in 22b6eaed0.
2020-10-11 20:31:33 -04:00
Henrik Lissner
22b6eaed03
Rethink lsp defaults
+ Allow LSP to prompt to install servers. All this machinary just adds
more confusion for beginners, and at least LSP asks for your permission
before it does it.
+ Reverts lsp-enable-file-watchers and lsp-enable-indentation to their
default (enabled), hopefully to help lsp-java, lsp-dart, and lsp-clojure
users, for whom file-watchers seems to be necessary.
+ Apply GC/IPC optimizations globally, to ensure their reach. By only
setting them buffer-locally we don't have a guarantee that subprocesses
will be affected when the lsp buffer isn't focused.

Closes #3989

Co-authored-by: Eric Dallo <ercdll1337@gmail.com>
2020-10-11 18:32:42 -04:00
Henrik Lissner
841eacc77d
tools/lsp: lazy load <leader> c l keybind
Fixes a issue where folks would try to rebind <leader> c, only to get a
non-prefix key error about <leader> c l.
2020-08-27 17:44:58 -04:00