nvim_oxi_api/opts/
open_term.rs1use crate::Buffer;
2use crate::ToFunction;
3
4pub type OnInputArgs = (
13 String, u32, Buffer, types::String, );
18
19#[derive(Clone, Debug, Default, macros::OptsBuilder)]
21#[repr(C)]
22pub struct OpenTermOpts {
23 #[cfg(feature = "neovim-0-10")] #[builder(mask)]
25 mask: u64,
26
27 #[cfg(not(feature = "neovim-0-10"))] #[builder(
29 generics = "F: ToFunction<OnInputArgs, ()>",
30 argtype = "F",
31 inline = "types::Object::from_luaref({0}.into_luaref())"
32 )]
33 on_input: types::Object,
35
36 #[cfg(feature = "neovim-0-10")] #[builder(
38 generics = "F: ToFunction<OnInputArgs, ()>",
39 argtype = "F",
40 inline = "{0}.into_luaref()"
41 )]
42 on_input: types::LuaRef,
44}
45
46#[cfg(not(feature = "neovim-0-10"))] impl From<&OpenTermOpts> for types::Dictionary {
48 fn from(opts: &OpenTermOpts) -> Self {
49 Self::from_iter([("on_input", opts.on_input.clone())])
50 }
51}