Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/modprog/nvim-perf-runtime_file
https://github.com/modprog/nvim-perf-runtime_file
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/modprog/nvim-perf-runtime_file
- Owner: ModProg
- License: mit
- Created: 2022-06-02T11:29:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-02T11:29:21.000Z (over 2 years ago)
- Last Synced: 2024-10-28T12:36:18.612Z (3 months ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Template for Neovim Plugins in Rust
Template for [ModProg/nvim-rust](https://github.com/ModProg/nvim-rust)
## Use with `cargo-hatch`
1. Install `cargo install cargo-hatch`
2. Use template `cargo hatch git https://github.com/ModProg/nvim-rust-hatch`## Build and test with `cargo-make`
1. Install `cargo install cargo-make`### Build the plugin
1. `makers release`
2. Copy `lua/*` to `lua` in the [nvim config directory](https://neovim.io/doc/user/starting.html#base-directories)
3. Add `require"perf".setup()` to your `init.lua`### Run it directly
1. `makers run`
2. Adjust invocation of plugin in `Makefile.toml`:
```sh
exec nvim --cmd "set runtimepath+=." "+lua require'${module_name}'.hello()"
```## Installation of finished plugin
### `packer.nvim`
depends on `cargo-make`:```lua
use {
'ModProg/rust-nvim-template',
run = 'makers release',
config = function()
require"perf".setup()
end
}
```### Manually
1. Compile the code with `cargo build --release`
2. Copy `target/release/libperf.so` to your nvim directory `lua/perf.so`
3. Add `require"perf".setup()` to your nvim initialization (i.e. `init.lua`)