nvim_runtime_lua

vim.list.bisect.Opts

@inlinedoc

Fields4

Opts.lo : nil | integer

Start index of the list. (default: 1)

Opts.hi : nil | integer

End index of the list, exclusive. (default: #t + 1)

Opts.key : string | fun(val: any) -> any | nil

Optional, compare the return value instead of the {val} itself if provided. If a string, index each value by this field name.

Opts.bound : "lower" | "upper" | nil

Specifies the search variant.

  • "lower": returns the first position
  • where inserting {val} keeps the list sorted.

  • "upper": returns the last position
  • where inserting {val} keeps the list sorted.. (default: 'lower')