@@ -3986,19 +3986,28 @@ comparisons and conversions between various types of positions.
39863986 as format conversions.
39873987
39883988 Fields: ~
3989- • {row} (`integer` ) 0-based byte index.
3990- • {col} (`integer` ) 0-based byte index.
3991- • {buf} ? (`integer` ) Optional buffer handle.
3989+ • {row} (`integer` ) 0-based byte index.
3990+ • {col} (`integer` ) 0-based byte index.
3991+ • {buf} ? (`integer` ) Optional buffer handle.
39923992
3993- When specified, it indicates that this position belongs to a
3994- specific buffer. This field is required when performing
3995- position conversions.
3996- • {to_lsp} (`fun(pos: vim.Pos, position_encoding: lsp.PositionEncodingKind)`)
3997- See | Pos:to_lsp() | .
3998- • {lsp} (`fun(buf: integer, pos: lsp.Position, position_encoding: lsp.PositionEncodingKind)`)
3999- See | Pos:lsp() | .
3993+ When specified, it indicates that this position belongs
3994+ to a specific buffer. This field is required when
3995+ performing position conversions.
3996+ • {to_lsp} (`fun(pos: vim.Pos, position_encoding: lsp.PositionEncodingKind)`)
3997+ See | Pos:to_lsp() | .
3998+ • {lsp} (`fun(buf: integer, pos: lsp.Position, position_encoding: lsp.PositionEncodingKind)`)
3999+ See | Pos:lsp() | .
4000+ • {to_cursor} (`fun(pos: vim.Pos): [integer, integer]`) See
4001+ | Pos:to_cursor() | .
4002+ • {cursor} (`fun(pos: [integer, integer])`) See | Pos:cursor() | .
40004003
40014004
4005+ Pos:cursor({pos} ) *Pos:cursor()*
4006+ Creates a new | vim.Pos | from cursor position.
4007+
4008+ Parameters: ~
4009+ • {pos} (`[integer, integer]`)
4010+
40024011Pos:lsp({buf} , {pos} , {position_encoding}) *Pos:lsp()*
40034012 Creates a new | vim.Pos | from `lsp .Position` .
40044013
@@ -4018,6 +4027,15 @@ Pos:lsp({buf}, {pos}, {position_encoding}) *Pos:lsp()*
40184027 • {pos} (`lsp .Position` )
40194028 • {position_encoding} (`lsp .PositionEncodingKind` )
40204029
4030+ Pos:to_cursor({pos} ) *Pos:to_cursor()*
4031+ Converts | vim.Pos | to cursor position.
4032+
4033+ Parameters: ~
4034+ • {pos} (`vim .Pos` ) See | vim.Pos | .
4035+
4036+ Return: ~
4037+ (`[integer, integer]`)
4038+
40214039Pos:to_lsp({pos} , {position_encoding}) *Pos:to_lsp()*
40224040 Converts | vim.Pos | to `lsp .Position` .
40234041
0 commit comments