SyntaxTokenizer: Added an option to skip the subsyntax separators when tokenizing and also trimming the text in the tokenizeText function.

ecode: Improved LSP mouse hover tooltips.
This commit is contained in:
Martín Lucas Golini
2023-01-28 02:10:19 -03:00
parent ae592d29ff
commit a34a76e574
7 changed files with 82 additions and 29 deletions

View File

@@ -535,7 +535,10 @@ void LSPClientPlugin::displayTooltip( UICodeEditor* editor, const LSPHover& resp
? SyntaxDefinitionManager::instance()->getByLSPName( "markdown" )
: editor->getSyntaxDefinition();
SyntaxTokenizer::tokenizeText( syntaxDef, editor->getColorScheme(), *tooltip->getTextCache() );
SyntaxTokenizer::tokenizeText( syntaxDef, editor->getColorScheme(), *tooltip->getTextCache(), 0,
0xFFFFFFFF, true, "\n\t " );
tooltip->notifyTextChangedFromTextCache();
if ( editor->hasFocus() && !tooltip->isVisible() )
tooltip->show();