Commit graph

84 commits

Author SHA1 Message Date
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
Itai Y. Efrat
258104f750 refactor(lsp): remove emacs 26 workarounds 2022-05-05 02:19:52 +02:00
Henrik Lissner
55e90f064f
Load gcmh-mode a little sooner
Ensures it is loaded in time when files are loaded directly from the
terminal.
2020-12-11 01:41:38 -05:00
Henrik Lissner
1811cae05c
Fix #4124: void-variable read-process-output-max
For Emacs 26 users, before this variable existed.
2020-10-21 21:09:58 -04:00
Henrik Lissner
b461f76b0d
Fix *-local-vars-hook & doom-first-*-hook not triggering
When starting Emacs with a file path argument these hooks aren't set up
in time for the file to be processed.

Fixes #3891, #4082, #4104
2020-10-16 23:08:56 -04:00
Henrik Lissner
1c7fd9c220
Fix #4093: runaway gc-cons-threshold in lsp-mode
gc-cons-threshold was doubled every time an lsp-mode buffer was
opened (i.e. every time +lsp-optimization-mode was activated) causing
heavy freezes.
2020-10-15 02:19:56 -04:00
Henrik Lissner
c344d40d15
tools/lsp: refactor +lsp-optimization-mode 2020-10-11 20:31:46 -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
0062c03ede
tools/lsp: apply after changing gcmh-high-cons-threshold 2020-10-08 23:43:12 -04:00
Henrik Lissner
ffb21b18e5
tools/lsp: minor refactor & doc revision 2020-08-22 15:34:52 -04:00
Henrik Lissner
6cf5d72ff6
Generalize LSP optimizations to include eglot 2020-08-12 00:34:09 -04:00
Henrik Lissner
d502c7c06a
tools/lsp: minor refactors 2020-05-28 22:01:23 -04:00
Gerry Agbobada
dc3c2f9e78
[review] no extension in load! / rename interactive function 2020-05-28 13:13:00 +02:00
Gerry Agbobada
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
Gerry Agbobada
3e5b7cce3f
[eglot] Add support for eglot lsp client in emacs
- Update README
- Add eglot-specifics to cc, rs, py, hs
  removing unused lsp-mode packages when eglot is active
- Add eglot-specific bindings
- Add doctor warnings for debugger +lsp and +peek
- Add eglot-backed lookup-handlers
- Add flycheck checker using eglot for :checkers
  syntax users (using flycheck/flycheck#1676 and
  flycheck/flycheck#1592 discussion).
  This implementation is based on @marsam code, and uses recent
  Flycheck development in order to make the code smaller and
  easier to maintain.
2020-05-28 09:34:10 +02:00
Henrik Lissner
8c3f24f14c
Disable lsp-auto-guess-root
This was too confusing for beginners. May as well have LSP prompt or a
project than sometimes guess incorrectly.

Closes #3212, #3075
2020-05-25 16:48:42 -04:00
Henrik Lissner
59b73121d0
Merge pull request #3094 from sei40kr/add-lookup-handlers
tools/lookup: Support lookup handlers for implementations and type definition
2020-05-14 04:21:24 -04:00
Henrik Lissner
717d53c666
Tweak GC settings, particularly for org & lsp
These two modes are particularly expensive. This needs more
testing.
2020-05-12 19:59:14 -04:00
Seong Yong-ju
d08f2dd888 tools/lookup: Support type definition lookup handlers 2020-05-12 01:06:23 +09:00
Seong Yong-ju
13134726dc tools/lookup: Support implementations lookup handlers 2020-05-12 01:03:52 +09:00
James Ravn
4f3cf24afb
Only enable lsp keymap binding when +bindings 2020-05-04 10:12:17 +01:00
James Ravn
fb3c6f9d78
Merge branch 'develop' of https://github.com/hlissner/doom-emacs into add-lsp-command-map 2020-05-04 10:04:23 +01:00
Henrik Lissner
b3c957065c
Remove company-lsp fallback
Issues with ts-ls and gopls have been reportedly resolved upstream, so
we are fully committing to company-capf as LSP's chosen backend.
2020-05-02 22:38:36 -04:00
Seong Yong-ju
84a179592d Remove lsp-groovy-server-install-dir 2020-04-29 23:16:15 +09:00
Henrik Lissner
6315984ae6
Add workaround for tigersoldier/company-lsp#128
Fix from emacs-lsp/lsp-python-ms#79
2020-04-21 22:02:48 -04:00
James Ravn
c56afcfe01
Add lsp-command-map to SPC-c-l
The default lsp-mode bindings are bound to `s-l` which is impractical
for anyone using keybindings in their window manager. It also conflicts
w/ the doom approach of using leader keys. This change makes
all the default lsp bindings (see
https://github.com/emacs-lsp/lsp-mode#commands) available on SPC-c-l.

So for example, restarting the lsp server can be done with `SPC c l s r`.
2020-04-21 22:22:14 +01:00
Henrik Lissner
bf657406b2
lsp-enable-links = nil #2911 2020-04-16 15:37:57 -04:00
Henrik Lissner
2b67d958e6
Fix lsp-restart-workspace not working
Because I forgot to forward the RESTART argument for lsp--shutdown-workspace.
2020-04-15 15:54:05 -04:00
Henrik Lissner
abfa09f86d
Focus lsp doc popup after +lookup/documentation 2020-04-15 00:13:35 -04:00
Henrik Lissner
42084af680
Add popup rule for *lsp-help* 2020-04-11 23:05:54 -04:00
Henrik Lissner
d41da2a14a
Bump :tools lsp
emacs-lsp/lsp-mode@76fe399 -> emacs-lsp/lsp-mode@401d724
emacs-lsp/lsp-ui@134d9b7 -> emacs-lsp/lsp-ui@242dfe8
emacs-lsp/lsp-ivy@39b90e7 -> emacs-lsp/lsp-ivy@a6b7841
2020-04-07 20:25:48 -04:00
Henrik Lissner
b3af9dbc3c
Add +lsp-defer-shutdown variable 2020-04-01 13:57:21 -04:00
Henrik Lissner
83b6f74d11
Minor refactors & reformatting 2020-03-27 21:39:27 -04:00
Henrik Lissner
d40e5dff4e
Make a few LSP features opt-in
For the sake of speed and reliability. Support for some of these
features are poorly implemented in some servers, and many are redundant
with mechanisms already available in Emacs/Doom.
2020-03-27 16:33:17 -04:00
Henrik Lissner
cb38bb23df
tools/lsp: minor refactor & reformatting
Also makes +lsp-init-flycheck-or-flymake-h respect more possible values
for lsp-diagnostic-package.
2020-02-29 19:08:55 -05:00
Henrik Lissner
861e0f71d5
Activate lsp-mode in indirect buffers 2020-02-29 19:07:38 -05:00
Henrik Lissner
29650a67a2
Fix #2636: lsp init short circuits in Emacs <=26 2020-02-29 19:06:50 -05:00
Sebastian Sturm
998dccd8fe Modernize lsp-mode integration
* switch the company-backend used by lsp-mode from company-lsp to
company-capf (said to provide better performance and allows us to remove
the dependency on company-lsp)

* when available (on recent builds of Emacs 27+), lsp-mode buffers will
now use a larger than default value of `read-process-output-max`.
According to the lsp-mode performance guide, this can also significantly
improve lsp-mode performance

* flycheck support recently moved into lsp proper; with this commit,
the lsp module follows suit and prefers lsp-flycheck over
lsp-ui-flycheck

* if the new module flag `+no-peek` is set, doom-emacs will now use the xref
backend for reference and definition lookup instead of the lsp-ui-peek-*
backend offered by lsp-ui-mode
2020-02-28 10:45:25 +01:00
Sebastian Sturm
e9ab396783 Update to latest lsp-mode, lsp-ui 2020-02-19 09:48:48 +01:00
Henrik Lissner
01c3f34bb0
Ensure lsp-ui doesn't overwrite file/dir-local flycheck-checker 2020-02-06 22:34:31 -05:00
Henrik Lissner
8aec15c287
Load lsp-mode a *little* later 2020-01-25 19:02:01 -05:00
Henrik Lissner
1e91c04c04
Fix #2408: wrong-number-of-args error on lsp-workspace-restart
Due to a change to lsp--shutdown-workspace upstream.
2020-01-23 01:45:18 -05:00
Henrik Lissner
24c65b1a22
Update lsp server install dirs
Follow-up of #2361
2020-01-12 17:00:13 -05:00
niklascarlsson
6731833f24 Update lsp-server-install-dir location
Update the lsp-server-install-dir to doom-etc-dir install of the default
which is directly at the root of the emacs dir.
2020-01-12 22:27:41 +01:00
Henrik Lissner
844a236949
Half-revert & rewrite +lsp-init-a
The original lsp is just too opinionated to delegate to. Better we just
initialize lsp entirely by hand, instead.
2020-01-10 05:15:54 -05:00
Henrik Lissner
3eb61601e5
Fix void-variable args error starting up lsp-mode 2020-01-10 05:09:34 -05:00
Henrik Lissner
46aaeee818
Update tools/lsp to reflect upstream changes
LSP has taken it upon themselves to aggressively install servers if they
are missing. No thanks. Promote deliberate use of lsp-install-server
where we can and load lsp-clients sooner.
2020-01-10 04:59:15 -05:00
Gerry Agbobada
f5d1081cde Add lsp-ivy and helm-lsp when :tools lsp (#2162)
* Add lsp-ivy and helm-lsp when :tools lsp
* Review

- Move the packages to :tools lsp
- Add bindings to config/+evil-bindings.el (no change to +emacs since
  there was no 'code' prefix)
- Move README section
- Move the packages to :tools lsp
- Add bindings to config/+evil-bindings.el (no change to +emacs since
  there was no 'code' prefix)

* FUp filechange noise
2019-12-19 18:49:27 -05:00
Henrik Lissner
58e674d8fb
tools/lsp: fix LSP prompting for project too often 2019-11-10 05:05:42 -05:00
Henrik Lissner
bf8ee34c19
tools/lsp: fix +lsp-prompt-if-no-project-a #1928
Don't prompt for blacklisted folders, and don't refuse to recognize
$HOME (let the user decide whether to blacklist it or not).
2019-11-08 16:02:07 -05:00