Commit graph

72 commits

Author SHA1 Message Date
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
Henrik Lissner
99cd52e70f
💥 Drop Emacs 25.x support
Emacs 26.1 is Doom's new minimum supported version

Closes #2026
2019-11-08 16:02:06 -05:00
Henrik Lissner
16a17ad970
tools/lsp: start lsp server unconditionally
Part 2 of f6d3ee588, in order for server restarting to work, since
shutting down the server doesn't turn off lsp-mode.
2019-11-02 15:50:26 -04:00
Henrik Lissner
f6d3ee5889
tools/lsp: fix lsp-workspace-restart 2019-11-02 15:50:02 -04:00
Henrik Lissner
196c716c74
tools/lsp: fix void-function (setf lsp--workspace-shutdown-action)) #1965 2019-10-29 11:36:46 -04:00
Henrik Lissner
1030f66c24
Revert 438caf276 (#1943)
This was fixed upstream in emacs-lsp/lsp-mode#1135
2019-10-24 13:31:08 -04:00
Henrik Lissner
438caf276b
tools/lsp: fix lsp in js scripts w/ no file ext #1943 2019-10-23 18:29:30 -04:00
Henrik Lissner
b7e2c7509f
tools/lsp: deregister workspace shutdown action
...if workspace buffers are present during the deferred shutdown.
2019-10-23 00:51:09 -04:00
Henrik Lissner
cba645be00
tools/lsp: defer server shutdown
To give theu ser a chance to open othe rproject files before the server
is auto-killed.
2019-10-21 19:01:57 -04:00
Henrik Lissner
c034bfdc87
tools/lsp: minor refactor & comment variables
Also moves lsp-fsharp-server-install-dir to
~/.emacs.d/.local/etc/lsp-fsharp
2019-10-21 19:01:06 -04:00
Henrik Lissner
8dfc4b3033
tools/lsp: prompt for project if one can't be guessed #1928
And don't recognize $HOME as a valid project root.
2019-10-21 18:29:11 -04:00
Henrik Lissner
0cca037448
tools/lsp: log project root when starting lsp #1928 2019-10-21 18:28:45 -04:00
Henrik Lissner
2d2413d293
tools/lsp: defer lsp init until buffer is visible 2019-10-18 21:10:56 -04:00