Skip to content

Commit

Permalink
Merge pull request #2388 from EspressoSystems/jr/doc_text_editor
Browse files Browse the repository at this point in the history
[DOCS] - Document text editor usage
  • Loading branch information
DieracDelta authored Feb 1, 2024
2 parents 1aca21c + c799c19 commit 6c75f2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .nvim/example.env.lua

This file was deleted.

25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,27 +195,12 @@ For espresso developers we have written up a description of our workflow [here](

# Extra Editor Configuration

## Neovim
Choose an async runtime to use before launching a text editor. This may be done by setting the environment RUSTFLAGS. For example:

Copy `.nvim/example.env.lua` to `.nvim/env.lua`. The purpose of this file is to return to neovim the requisite feature flags.

Then load this file when configuring `rust-tools`:

```lua
rust_tools.setup(
{server =
{settings =
{
["rust-analyzer"] =
{cargo =
{features =
loadfile(".nvim/env.lua") and { loadfile(".nvim/env.lua")() } or "all"
}
}
}
}
}
)
```
export RUSTFLAGS='--cfg async_executor_impl="tokio" --cfg async_channel_impl="tokio"' # export RUSTFLAGS so the editor is aware of extra flags
nvim # launch text editor of choice. We choose neovim in this example
unset RUSTFLAGS # Unset rustflags so we may continue to use the justfile. The justfile sets these particular config options
```

# Debugging
Expand Down

0 comments on commit 6c75f2f

Please sign in to comment.