载入中...
搜索中...
未找到
eve::dev::lsp 命名空间参考

命名空间

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.

参数
rangenullptr 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.

被这些函数引用 eve::dev::LanguageServer::changeDocument().

◆ coveringLines()

EVENGINE_API_FOUNDATION Range eve::dev::lsp::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.

在文件 LanguageText.cpp 第 162 行定义.

引用了 eve::dev::lsp::Range::end, lastLineIndex(), range, source , 以及 eve::dev::lsp::Range::start.

被这些函数引用 eve::dev::LanguageServer::formatDocument() , 以及 sliceLines().

◆ documentRange()

EVENGINE_API_FOUNDATION Range eve::dev::lsp::documentRange ( std::string_view  source)
noexcept

Full-document range covering every character in source.

在文件 LanguageText.cpp 第 151 行定义.

引用了 source.

被这些函数引用 eve::dev::LanguageServer::formatDocument().

◆ foldingRanges()

EVENGINE_API_FOUNDATION std::vector< FoldingRange > eve::dev::lsp::foldingRanges ( std::string_view  source)

Brace, bracket, and block-comment folds that span more than one line.

在文件 LanguageText.cpp 第 230 行定义.

引用了 kind, line, source, start, state , 以及 value.

被这些函数引用 eve::dev::LanguageServer::foldingRanges().

◆ 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.

被这些函数引用 eve::dev::LanguageServer::formatDocument().

◆ lastLineIndex()

EVENGINE_API_FOUNDATION size_t eve::dev::lsp::lastLineIndex ( std::string_view  source)
noexcept

Last 0-based line index (empty source is line 0).

在文件 LanguageText.cpp 第 155 行定义.

引用了 line, source , 以及 value.

被这些函数引用 coveringLines() , 以及 eve::dev::LanguageServer::formatDocument().

◆ offsetAt()

EVENGINE_API_FOUNDATION size_t eve::dev::lsp::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).

在文件 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.

被这些函数引用 eve::dev::LanguageServer::formatDocument().