Documentation
¶
Overview ¶
Package length provides various length that can be used for configuring the behavior of line/column calculations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Unit ¶
type Unit int
Unit represents units of measurement for the length of a string.
The most commonly used Unit in protocompile is TermWidth, which approximates columns in a terminal emulator. This takes into account the Unicode width of runes, and tabstops. The rune A is one column wide, the rune 貓 is two columns wide, and the multi-rune emoji presentation sequence 🐈⬛ is also two columns wide.
Other units of length can be used to cope with the needs of other rendering contexts, such as the Language Server Protocol.
Click to show internal directories.
Click to hide internal directories.