[Feat] remove rust lib plugin
parent
42831a4907
commit
f193ebc7dc
|
@ -1,6 +1,5 @@
|
||||||
local codesnap = require("codesnap")
|
local codesnap = require("codesnap")
|
||||||
local foo = require("foo")
|
|
||||||
|
|
||||||
foo.say_hello("Mist")
|
vim.api.nvim_create_user_command("CodeSnap", function()
|
||||||
|
codesnap.setup()
|
||||||
vim.api.nvim_create_user_command("CodeSnap", function() end, {})
|
end, {})
|
||||||
|
|
19
src/lib.rs
19
src/lib.rs
|
@ -1,19 +0,0 @@
|
||||||
use nvim_oxi as oxi;
|
|
||||||
use oxi::{print, Dictionary, Function, Result};
|
|
||||||
|
|
||||||
fn hello(arg: String) -> Result<String> {
|
|
||||||
Ok(format!("Hello {arg}"))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn say_hello(arg: String) -> Result<()> {
|
|
||||||
print!("{:?}", hello(arg));
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[oxi::module]
|
|
||||||
fn foo() -> oxi::Result<Dictionary> {
|
|
||||||
Ok(Dictionary::from_iter([(
|
|
||||||
"say_hello",
|
|
||||||
Function::from_fn(say_hello),
|
|
||||||
)]))
|
|
||||||
}
|
|
Loading…
Reference in New Issue