Skip to content

internal: Update documentation for emacs and split it for LSP-mode and Eglot #14024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

meliache
Copy link
Contributor

@meliache meliache commented Jan 25, 2023

Emacs has now two LSP clients, the more minimalistic and lightweight Eglot and the extensive though a bit bloated LSP Mode. Eglot will soon be shipped with Emacs29. Both have rust-analyzer enabled by default and require no further setup other then being installed and enabled. lsp-rust.el is not required anymore.

The base-installation for each of those modes is so easy now that I don't think an enumerated list is necessary, both packages can be installed via the standard M-x package-install and the installation is a one-liner that I provide.

Configuration is only necessary for supporting the rust-analyzer extensions to the LSP protocol, which are built into LSP mode and require an extension-package for Eglot.

But for further documentation, including the LSP extensions, I link against official documentation where possible to avoid duplicating efforts having to continually update this to stay up-to-date.

I rewrote most of the original emacs documentation, but the linked blog post by @rksm seems still being actively updated with updates to LSP mode, so I kept the link. That blog post is opinionated, I personally use different packages which achieve similar end results (Eglot instead of LSP-mode, corfu instead of capf, vertico instead of helm etc.). But if someone doesn't already have an extensive Emacs configuration, I think this is not a bad starting point.

Disclaimer: I'm a Rust beginner, which is why I read the rust-analyzer setup docs. So I necessarily know how most Rust experts use Emacs. But I'm an experienced Emacs user who uses several other programming languages via LSP-mode support in Emacs. I used both, initially LSP-mode and recently migrated to Eglot.

Also I'm not an experienced in writing asciidoc and I didn't do a local test-built, hopefully the html builds in the way I imagine it. So I recommend to check that aspect of the PR. Maybe the documentation is in the CI build-artifacts?

This is a duplicate of a PR to the old rust-analyzer project rust-analyzer/rust-analyzer.github.io#197, which I made because I didn't know that the documentation now lives here.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 25, 2023
@meliache meliache changed the title Update documentation for emacs and split for LSP and Eglot modes Update documentation for emacs and split it for LSP-mode and Eglot Jan 25, 2023
@lnicola
Copy link
Member

lnicola commented Jan 25, 2023

@bors delegate+

@bors
Copy link
Contributor

bors commented Jan 25, 2023

✌️ @meliache can now approve this pull request

Emacs has now two LSP clients, the more minimalistic and lightweight Eglot and
the extensive though a bit bloated LSP-Mode. Eglot will soon be
shipped with Emacs29. Both have rust-analyzer enabled by default and require
no further setup then just being installed and enabled. `lsp-rust.el` is not
required anymore.

The base-installation for each of those modes is so easy now that I don't think
an enumerated list is necessary, both package can be installed via the standard
`M-x package-install` and the installation is a one-liner that I provide.

Configuration mostly comes into play for support the rust-analyzer extensions to
the LSP protocol, which are built into LSP mode and require an extension-package
for Eglot.

But for the configuration beyond the base configuration I link against official
documentation, quickstart guides and documentation for the lsp extensions, to
avoid showing outdated information here.

This commit is mostly a duplicate of a PR [1] that I made against the
rust-analyzer github project.

[1]: rust-analyzer/rust-analyzer.github.io#197,
     rust-analyzer/rust-analyzer.github.io@7ff0113

Spelling: Space before version number in Emacs 29 in manual

Co-authored-by: Laurențiu Nicola <[email protected]>
@meliache meliache force-pushed the update-split-emacs-documentation branch from 71fb3d6 to 1836614 Compare January 25, 2023 12:37
@lnicola
Copy link
Member

lnicola commented Jan 25, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jan 25, 2023

📌 Commit 1836614 has been approved by lnicola

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 25, 2023

⌛ Testing commit 1836614 with merge 85736de...

@lnicola lnicola changed the title Update documentation for emacs and split it for LSP-mode and Eglot internal: Update documentation for emacs and split it for LSP-mode and Eglot Jan 25, 2023
@bors
Copy link
Contributor

bors commented Jan 25, 2023

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 85736de to master...

@bors bors merged commit 85736de into rust-lang:master Jan 25, 2023
@meliache meliache deleted the update-split-emacs-documentation branch January 25, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants