Repository navigation
API turboframe.lsp
Source: turboframe/lsp/init.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.
What the Language Server Protocol counts, as the editor counts it.
The protocol places a position by line and column in UTF-16 code units; the editor by character offset in its text. Completions may come as snippets (${1:name}) and hovers as Markdown: both become plain text here.
clean_hover, from_snippet, line_starts, plain_markup, to_offset, to_position
def clean_hover(text: str) -> strMarkdown's fences, heading marks, rules and escapes out of a hover; blank runs squeezed.
def from_snippet(text: str, caret: str) -> strA snippet as plain text: placeholders keep their default text, the first tab stop (or $0) becomes caret.
def line_starts(text: str) -> list[int]def plain_markup(value) -> strHover contents (MarkupContent, MarkedString or a list) as text.
def to_offset(text: str, line: int, character: int, starts: list[int] | None = None) -> int(line, UTF-16 column) -> text offset (clamped to the line).
def to_position(text: str, offset: int, starts: list[int] | None = None) -> tuple[int, int]Text offset -> (line, UTF-16 column).
TurboFrame · part of Divengine · GPL-3.0-or-later · report an issue
Tutorial
Examples
The desktop
- The Desktop
- Application Mixins
- Windows and Lists
- Dialogs
- Histories
- Progress
- Themes and Colors
- Glyphs
- Settings and Recent Files
- Command Palette
Editing
Tasks
Languages
Running
Reference
Links