Skip to content

Commit

Permalink
📗 update the examples' README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
noib3 committed Aug 28, 2022
1 parent 13b05a3 commit 3afc693
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions examples/README.md
@@ -1,18 +1,27 @@
# Examples

There are currently only 3 example plugins, with more to be added as requested.
Roughly in order of which one you should go through first:

- `calc`: shows how to expose your plugin's core functions to Lua;

- `api`: shows how to use the `api` module to create commands, set keymaps and
manipulate floating windows;

- `mechanic`: shows how to deserialize Lua tables into Rust objects using
[`serde`](https://serde.rs).
[`serde`](https://serde.rs);

- `mlua`: shows how to integrate `nvim-oxi` with the
[`mlua`](https://github.com/khvzak/mlua) crate;

- `async`: shows how to use the `nvim_oxi::r#loop` module to trigger a callback
registered on the Neovim thread from other threads.

The examples also include some snippets of Lua code that you can use to test
the plugins from Neovim once you've compiled and loaded them following the
steps below.

NOTE: all the examples are compiled **without** the `nightly` feature flag,
which means they might not work if using a nightly version of Neovim. Consider
using the latest stable Neovim version when testing them.

## Crate setup

The first step is to create a new library crate with `cargo new --lib
Expand Down

0 comments on commit 3afc693

Please sign in to comment.