mirror of
https://github.com/noib3/nvim-oxi.git
synced 2025-12-23 06:30:57 +00:00
fix(api): fix get_option_value's docs (#268)
This commit is contained in:
parent
e97897ddff
commit
c7886c8d5f
3 changed files with 9 additions and 7 deletions
|
|
@ -21,6 +21,10 @@
|
|||
instead of a `Result<PathBuf>`
|
||||
([#262](https://github.com/noib3/nvim-oxi/pull/262));
|
||||
|
||||
- The `buffer` method on `nvim_oxi::api::opts::OptionOpts` builder has been
|
||||
renamed to `buf` to make it consistent with upstream's naming
|
||||
([#268](https://github.com/noib3/nvim-oxi/pull/268));
|
||||
|
||||
### Fixed
|
||||
|
||||
- fixed the definition of `DecorationProviderOpts`, which was causing
|
||||
|
|
|
|||
|
|
@ -52,11 +52,9 @@ pub fn get_option_info2(name: &str, opts: &OptionOpts) -> Result<OptionInfos> {
|
|||
/// Binding to [`nvim_get_option_value()`][1].
|
||||
///
|
||||
/// Gets the local value of an option if it exists, or the global value
|
||||
/// otherwise. Local values always correspond to the current buffer or window.
|
||||
///
|
||||
/// To get a buffer-local orr window-local option for a specific buffer of
|
||||
/// window consider using [`Buffer::get_option`](crate::Buffer::get_option) or
|
||||
/// [`Window::get_option`](crate::Window::get_option) instead.
|
||||
/// otherwise. Local values always correspond to the current buffer or
|
||||
/// window, unless [`buf`](crate::opts::OptionOptsBuilder::buf) or
|
||||
/// [`win`](crate::opts::OptionOptsBuilder::win) is set in `opts`.
|
||||
///
|
||||
/// [1]: https://neovim.io/doc/user/api.html#nvim_get_option_value()
|
||||
pub fn get_option_value<Opt>(name: &str, opts: &OptionOpts) -> Result<Opt>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use types::conversion::FromObject;
|
|||
|
||||
use crate::{Buffer, Window};
|
||||
|
||||
/// Options passed to
|
||||
/// Options passed to [`get_option_value()`](crate::get_option_value) and
|
||||
/// [`set_option_value()`](crate::set_option_value).
|
||||
#[derive(Clone, Debug, Default, macros::OptsBuilder)]
|
||||
#[repr(C)]
|
||||
|
|
@ -17,7 +17,7 @@ pub struct OptionOpts {
|
|||
#[builder(argtype = "Window", inline = "{0}.0")]
|
||||
win: types::WinHandle,
|
||||
|
||||
#[builder(method = "buffer", argtype = "Buffer", inline = "{0}.0")]
|
||||
#[builder(argtype = "Buffer", inline = "{0}.0")]
|
||||
buf: types::BufHandle,
|
||||
|
||||
#[builder(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue