Skip to content

Commit

Permalink
Merge pull request #464 from brotzeit/#461
Browse files Browse the repository at this point in the history
improve installation section for package.el
  • Loading branch information
brotzeit authored Nov 18, 2022
2 parents ed32353 + b725219 commit 35bf7fb
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Intro](#intro)
- [Known issues](#known-issues)
- [Installation](#installation)
- [package](#package)
- [straight](#straight)
- [remote](#remote)
- [Compilation](#compilation)
Expand Down Expand Up @@ -103,27 +104,30 @@ rustic namespace for backwards compatability reasons(rustic has been a fork).

First, you may need to install `rust-analyzer`. See [Automatic server installation](#automatic-server-installation).

Simply put `(use-package rustic)` in your config and most stuff gets
configured automatically.
([use-package](https://github.com/jwiegley/use-package))
If you can't run rust-analyzer or cargo can't be found, your
environment variables probably don't work in emacs. Try
[exec-path-from-shell](https://github.com/purcell/exec-path-from-shell/tree/81125c5adbc903943c016c2984906dc089372a41#usage)
to fix this.

### package

This section explains how to install rustic with the default package manager.
It's necessary to include elpa for a package dependency:

```elisp
(require 'package)
(setq package-archives '(("melpa" . "http://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
(package-refresh-contents)
(use-package rustic)
```

If ‘spinner-1.7.3’ is unavailable” when trying to install rustic, you
need to update GPG keys used by the ELPA package manager. Try
installing
[gnu-elpa-keyring-update](https://elpa.gnu.org/packages/gnu-elpa-keyring-update.html).

If you can't run rust-analyzer or cargo can't be found, your
environment variables probably don't work in emacs. Try
[exec-path-from-shell](https://github.com/purcell/exec-path-from-shell/tree/81125c5adbc903943c016c2984906dc089372a41#usage)
to fix this.

### straight

[straight.el](https://github.com/raxod502/straight.el#install-packages)
Expand Down Expand Up @@ -217,6 +221,9 @@ Additional faces:

## Rustfmt

Ensure rustfmt is installed by running `rustup component add rustfmt-preview`
in your project's directory.

You can format your code with:

- `rustic-format-buffer` format buffer with stdin
Expand Down

0 comments on commit 35bf7fb

Please sign in to comment.