Vcaml.Windowinclude module type of struct include Nvim_internal.Window endtype t = Nvim_internal.windowval sexp_of_t : t -> Sexplib0.Sexp.tinclude Core.Comparable.S_plain with type t := tinclude Base.Comparable.S with type t := tinclude Base.Comparisons.S with type t := tascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~compare:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.
clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.
Raises if not (min <= max).
val clamp : t -> min:t -> max:t -> t Base.Or_error.tinclude Base.Comparator.S with type t := ttype comparator_witness = Nvim_internal.Window.comparator_witnessval comparator : (t, comparator_witness) Base.Comparator.T.comparatorval validate_lbound : min:t Core.Maybe_bound.t -> t Validate.checkval validate_ubound : max:t Core.Maybe_bound.t -> t Validate.checkval validate_bound :
min:t Core.Maybe_bound.t ->
max:t Core.Maybe_bound.t ->
t Validate.checkmodule Replace_polymorphic_compare =
Nvim_internal.Window.Replace_polymorphic_comparemodule Map = Nvim_internal.Window.Mapmodule Set = Nvim_internal.Window.Setinclude Core.Hashable.S_plain with type t := tinclude Ppx_compare_lib.Comparable.S with type t := tinclude Ppx_hash_lib.Hashable.S_any with type t := tval hash_fold_t : t Ppx_hash_lib.hash_foldval hash : t -> Ppx_hash_lib.Std.Hash.hash_valueval hashable : t Base.Hashable.tmodule Table = Nvim_internal.Window.Tablemodule Hash_set = Nvim_internal.Window.Hash_setmodule Hash_queue = Nvim_internal.Window.Hash_queueinclude Msgpack.Msgpackable with type t := tval of_msgpack : Msgpack__.Message.t -> t Core.Or_error.tval to_msgpack : t -> Msgpack__.Message.tval t : t Nvim_internal.Phantom.tmodule Or_current = Nvim_internal.Window.Or_currentval get_buf :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Nvim_internal.Buffer.t Async.Deferred.Or_error.tGet the buffer currently in the window.
val set_buf :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
buffer:Nvim_internal.Buffer.t ->
unit Async.Deferred.Or_error.tSet the buffer for the window without triggering autocommands that relate to cursor movements, such as WinEnter or BufEnter. Note that there is an outstanding issue where autocommands that should still be triggered are not being triggered. For details, see https://github.com/neovim/neovim/issues/10070.
module When_this_is_the_buffer's_last_window : sig ... endval close :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
when_this_is_the_buffer's_last_window:When_this_is_the_buffer's_last_window.t ->
unit Async.Deferred.Or_error.tClose the given window. If this is not the current window, no WinLeave event will be triggered because closing it does not require changing windows.
val exists :
here:lexing_position ->
_ Client.t ->
t ->
bool Async.Deferred.Or_error.tval get_height :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
int Async.Deferred.Or_error.tval set_height :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
height:int ->
unit Async.Deferred.Or_error.tval get_width :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
int Async.Deferred.Or_error.tval set_width :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
width:int ->
unit Async.Deferred.Or_error.tval get_cursor :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Position.One_indexed_row.t Async.Deferred.Or_error.tGet the cursor position for the given window. Every window in Neovim has a cursor position - for inactive windows, this is the position the cursor will assume when the window becomes active.
val set_cursor :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Position.One_indexed_row.t ->
unit Async.Deferred.Or_error.tSet the cursor position for the given window. This will not move the cursor to the window, but the window will still scroll to ensure the cursor position is visible.
val get_var :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
string ->
type_:'a Nvim_internal.Phantom.t ->
'a Async.Deferred.Or_error.tGet a window variable (see `:h w:`).
val set_var :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
string ->
type_:'a Nvim_internal.Phantom.t ->
value:'a ->
unit Async.Deferred.Or_error.tSet a window variable (see `:h w:`). Before using this, note that users have the freedom to change the values of these variables. If that would be undesirable, keep your state management inside your plugin.
val delete_var :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
string ->
unit Async.Deferred.Or_error.tDelete a window variable (see `:h w:`).
val get_tab :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Nvim_internal.Tabpage.t Async.Deferred.Or_error.tval get_number :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
int Async.Deferred.Or_error.tThe window number is a relative identifier of the window among the other windows in the tabpage. This is different from the window ID (represented by t), which is unique per window and is never reused.
val get_position :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Position.t Async.Deferred.Or_error.tGet the display position of the window.
module Config : sig ... endThis module represents the configuration of an external or floating window. An external window exists outside Neovim; a floating window is drawn in Neovim on top of normal windows.
val open_floating :
here:lexing_position ->
_ Client.t ->
?noautocmd:bool ->
unit ->
buffer:Nvim_internal.Buffer.Or_current.t ->
enter:bool ->
config:Config.Floating.t ->
minimal_style:bool ->
t Async.Deferred.Or_error.tOpen a floating window. enter specifies whether the cursor should be placed in the window after opening it. Most use cases will want to set minimal_style = true. Note that if the given buffer is not loaded, opening it in the floating window may not trigger certain autocommands you may expect to trigger on file load, e.g., FileType autocommands. For details, see https://github.com/neovim/neovim/issues/10070#issuecomment-537854497.
val open_external :
here:lexing_position ->
_ Client.t ->
?noautocmd:bool ->
unit ->
buffer:Nvim_internal.Buffer.Or_current.t ->
enter:bool ->
config:Config.External.t ->
minimal_style:bool ->
t Async.Deferred.Or_error.tOpen an external window (must be supported by the attached UIs).
val get_config :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Config.t option Async.Deferred.Or_error.tReturns Some config for floating and external windows and returns None for normal windows.
val set_config :
here:lexing_position ->
_ Client.t ->
Or_current.t ->
Config.t ->
unit Async.Deferred.Or_error.tThis API obscures a limitation inherent in nvim_win_set_config's interface: because absent config keys will not be changed and there is no support for removing keys, if Config.Floating.corner_pos = Relative_to_text_in_window { ... }, the type of corner positioning cannot be changed because it sets the "bufpos" key, which no other positioning schemes override.
module Statusline : sig ... endmodule Winbar : sig ... endmodule Statuscolumn : sig ... endmodule Fast : sig ... endThese API functions are served immediately without waiting in the input queue.
module Option : sig ... end