命名空间 | |
| namespace | SemanticMods |
| LSP semantic-token modifier bits (must match the initialize legend). | |
| namespace | SemanticTypes |
| LSP semantic-token type indices (must match the initialize legend). | |
类 | |
| struct | FoldingRange |
| One foldable region (0-based inclusive end line). 更多... | |
| struct | FormatOptions |
| Editor formatting preferences from LSP FormattingOptions. 更多... | |
| struct | Location |
| Location public API. 更多... | |
| struct | Position |
| Position public API. 更多... | |
| struct | Range |
| Range public API. 更多... | |
| struct | SemanticToken |
| One identifier classified for editor semantic highlighting. 更多... | |
| struct | TextEdit |
| TextEdit public API. 更多... | |
| class | WorkspaceIndex |
| Cross-file semantic index for EveScript source modules. 更多... | |
函数 | |
| size_t | offsetAt (std::string_view source, Position position) noexcept |
| Converts an LSP position into a UTF-8 byte offset (same contract as the rest of the server). | |
| Range | documentRange (std::string_view source) noexcept |
| Full-document range covering every character in source. | |
| size_t | lastLineIndex (std::string_view source) noexcept |
| Last 0-based line index (empty source is line 0). | |
| Range | coveringLines (std::string_view source, size_t startLine, size_t endLineInclusive) noexcept |
Half-open LSP range covering startLine through endLine inclusive. Ends at the start of the following line when one exists. | |
| std::string | sliceLines (std::string_view source, size_t startLine, size_t endLineInclusive) |
Source bytes for coveringLines of the same line span. | |
| bool | applyIncremental (std::string &source, const Range *range, std::string_view text) |
| Applies one LSP content change. | |
| std::string | formatEveScript (std::string_view source, const FormatOptions &options={}) |
| Indents EveScript by braces/brackets and trims trailing whitespace. | |
| std::vector< FoldingRange > | foldingRanges (std::string_view source) |
| Brace, bracket, and block-comment folds that span more than one line. | |
函数说明
◆ applyIncremental()
| EVENGINE_API_FOUNDATION bool eve::dev::lsp::applyIncremental | ( | std::string & | source, |
| const Range * | range, | ||
| std::string_view | text | ||
| ) |
Applies one LSP content change.
- 参数
-
range nullptr replaces the whole document.
- 返回
- false when the range is out of bounds.
在文件 LanguageText.cpp 第 184 行定义.
引用了 begin, eve::dev::lsp::Range::end, end, offsetAt(), range, source, eve::dev::lsp::Range::start , 以及 text.
◆ coveringLines()
|
noexcept |
Half-open LSP range covering startLine through endLine inclusive. Ends at the start of the following line when one exists.
在文件 LanguageText.cpp 第 162 行定义.
引用了 eve::dev::lsp::Range::end, lastLineIndex(), range, source , 以及 eve::dev::lsp::Range::start.
被这些函数引用 eve::dev::LanguageServer::formatDocument() , 以及 sliceLines().
◆ documentRange()
|
noexcept |
◆ foldingRanges()
| EVENGINE_API_FOUNDATION std::vector< FoldingRange > eve::dev::lsp::foldingRanges | ( | std::string_view | source | ) |
◆ formatEveScript()
| EVENGINE_API_FOUNDATION std::string eve::dev::lsp::formatEveScript | ( | std::string_view | source, |
| const FormatOptions & | options | ||
| ) |
Indents EveScript by braces/brackets and trims trailing whitespace.
在文件 LanguageText.cpp 第 196 行定义.
引用了 options, source, state , 以及 eve::dev::lsp::FormatOptions::tabSize.
◆ lastLineIndex()
|
noexcept |
Last 0-based line index (empty source is line 0).
在文件 LanguageText.cpp 第 155 行定义.
被这些函数引用 coveringLines() , 以及 eve::dev::LanguageServer::formatDocument().
◆ offsetAt()
|
noexcept |
Converts an LSP position into a UTF-8 byte offset (same contract as the rest of the server).
在文件 LanguageText.cpp 第 141 行定义.
引用了 line, offset, position , 以及 source.
被这些函数引用 applyIncremental() , 以及 sliceLines().
◆ sliceLines()
| EVENGINE_API_FOUNDATION std::string eve::dev::lsp::sliceLines | ( | std::string_view | source, |
| size_t | startLine, | ||
| size_t | endLineInclusive | ||
| ) |
Source bytes for coveringLines of the same line span.
在文件 LanguageText.cpp 第 176 行定义.
引用了 begin, coveringLines(), eve::dev::lsp::Range::end, end, offsetAt(), range, source , 以及 eve::dev::lsp::Range::start.