Fix for multi-line signature help labels, now labels will be flatten into a single line (SpartanJ/ecode#388).

Fix next signature help position.
Fix signature help and suggestions styles for light color schemes, and some minor improvements for other schemes.
Allow to set extra trigger characters for signature help in LSP configurations (fix zig zls not updating signature position after a "," input).
Plus some other minor fixes.
This commit is contained in:
Martín Lucas Golini
2025-02-02 19:07:41 -03:00
parent 863c0ec1c0
commit d3bc6f2935
18 changed files with 292 additions and 72 deletions

View File

@@ -437,6 +437,9 @@ class EE_API String {
/** @return The number of codepoints of the utf8 string. */
static size_t utf8Length( const std::string_view& utf8String );
/** Converts a character position from an utf8 string to a code point position */
static size_t utf8ToCodepointPosition( const std::string_view& utf8Text, size_t utf8Pos );
/** @return The next character in a utf8 null terminated string */
static Uint32 utf8Next( char*& utf8String );

View File

@@ -114,6 +114,12 @@ class EE_API TextRange {
bool isNormalized() const { return mStart <= mEnd; }
static TextRange convertToLineColumn( const String::View& text, Int64 startOffset,
Int64 endOffset );
static TextRange convertToLineColumn( const std::string_view& text, Int64 startOffset,
Int64 endOffset );
private:
TextPosition mStart;
TextPosition mEnd;
@@ -121,6 +127,10 @@ class EE_API TextRange {
TextPosition normalizedStart() const { return mStart < mEnd ? mStart : mEnd; }
TextPosition normalizedEnd() const { return mStart < mEnd ? mEnd : mStart; }
template <typename StringType>
static TextRange convertToLineColumn( const StringType& text, Int64 startOffset,
Int64 endOffset );
};
class EE_API TextRanges : public std::vector<TextRange> {