Commit Graph

32 Commits

Author SHA1 Message Date
fb0dc4cc85 refactor(lib): doom-debug-mode: make verbosity selective
Now `doom-debug-mode` manipulates `doom-log-level` if you activate it
with a prefix arg, setting it to 1 by default, reducing its verbosity
and cutting down on noise in the logs.
2025-04-11 12:17:44 -04:00
6919d5e1c4 fix(lsp): eglot: don't manage flymake
Amend: 8afc08a7a8
2025-04-04 05:30:27 -04:00
448bc5cae2 refactor: use negated flags
Ref: 7a806521a92c
2024-10-20 02:41:50 -04:00
173842ccea fix(lsp): eglot-ensure advice nooping in some major modes
Due to the nested structure of eglot-server-programs, our advice would
not correctly detect entries for some modes (like javascript modes),
effectively disabling Eglot in those modes.

I've replaced the advice with a solution baked into lsp!, so folks still
have the option of using eglot-ensure directly if they want it activated
unconditionally.

Amend: #7219
2024-08-14 18:01:59 -04:00
d3d5047488 fix(lsp): revert refactor of map! call
This change (made in ae9e1fea) was a tad too hasty, since
general.el (under the hood) implicitly deferred the keybinding until
eglot-mode-map, which define-key does not do.

Fix: #7911
Amend: ae9e1feaa6
2024-06-29 02:55:46 -04:00
ae9e1feaa6 refactor: avoid needless macro calls
Avoid macros where we really don't need them.
2024-06-28 17:00:58 -04:00
367b671134 refactor(lsp): suffix advice & remove redundancy
- Advice functions ought to have a -a suffix.
- `eglot-send-changes-idle-time` is already 0.5 upstream, by default.
2024-03-21 11:27:18 -04:00
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
193475cd64 fix(lsp): s/eglot-events-buffer-size/eglot-events-buffer-config/
Amend: 5f858bb142
2024-03-13 01:09:47 -04:00
5f858bb142 refactor(lsp): obsolete eglot-events-buffer-size
Ref: 88c46bd4db
2024-03-13 01:00:38 -04:00
6bea1f6a35 perf(lsp): turn off eglot events buffer
The `eglot-events-buffer-size` setting disables the `eglot-events-buffer`
when 0, enabling more consistent performance on long running emacs
instance.
Default is 2000000 lines. After each new event the events buffer
is pretty printed as a whole, which causes steady performance decrease
over time.
Quite a bit of CPU is spent on pretty priting and Emacs GC is put under
high pressure.
2023-11-24 10:42:42 -05:00
37bfe0824b tweak(lsp): feature gate flycheck eglot
When flymake is enabled.
2023-07-25 00:19:12 +01:00
b957142e3e feat(lsp): use flymake when enabled 2023-07-24 23:51:40 +01:00
81ec1a70d0 fix(lsp): advise eglot-ensure to always load
Advise eglot-ensure to only attempt to run when the mode in question has
a server configured
2023-07-22 16:41:13 +02:00
25611707ed refactor(lsp): switch to flycheck-eglot package
We no longer need to maintain our own juryrigged version of this
functionality.
2023-02-21 03:30:51 -05:00
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
d2d940fdf1 feat(lsp,vertico): add consult-eglot
- Load when :tools lsp +eglot and :completion vertico are on
- Bind consult-eglot-symbols to <leader> c j
2021-09-15 01:03:11 +03:00
6678f3833b fix(lsp): explicitly set xref handlers for eglot
Otherwise a major mode's lookup handlers may take precedence (e.g. in
go-mode).

Close #5329
2021-08-06 03:50:33 -04:00
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
813dc6e664 fix(:tools lsp): make eglot diags use flycheck with :checkers syntax
Research on how Flycheck work, and a pending fix from Eglot, allowed to
get a cleaner representation of how this "hack" works and make it more
resilient

Co-Authored-By: Steve Purcell <steve@sanityinc.com>
2021-04-14 09:09:37 +02:00
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
4e82ee4397 Refactor doom-debug-mode
+ Add explain-pause-mode
+ Now reloads itself if doom-debug-variables is changed or when one of
  its variables becomes available.
+ doom-debug-variables now supports a cons cell entry where its CAR is
  the name of the variable and CDR is the value it should be set to when
  doom-debug-mode is active.
2020-08-21 01:26:24 -04:00
06c6946742 tools/lsp: defer auto-shutdown of eglot server 2020-08-21 00:03:01 -04:00
9e9b95f49c Fix #3789: fix eglot lookup-documentation handler
Eglot replaced `eglot-help-at-point' in joaotavora/eglot@a044dec,
breaking our documentation lookup handler.
2020-08-20 14:07:47 -04:00
6cf5d72ff6 Generalize LSP optimizations to include eglot 2020-08-12 00:34:09 -04:00
d8c6030a14 tools/lsp: Use general implementation lookup handler 2020-06-24 01:56:26 +09:00
d502c7c06a tools/lsp: minor refactors 2020-05-28 22:01:23 -04:00
dc3c2f9e78 [review] no extension in load! / rename interactive function 2020-05-28 13:13:00 +02:00
c41ae8995b Remove redundant featurep! check 2020-05-28 11:50:24 +02:00
f35768af86 Fix loading of flycheck-eglot 2020-05-28 11:19:33 +02:00
718d9a2690 [review] Changes 2020-05-28 11:17:55 +02:00
6a163fd5c1 [review] create +lsp.el and +eglot.el files
This means we can remove a lot of `:unless (featurep! +eglot)`
2020-05-28 11:17:55 +02:00