'Scintilla.Lexer' is obsolete #98
Replies: 6 comments 2 replies
-
Hi, Here are the supported lexer names:
The code to get the supported lexer names: for (int i = 0; i < Lexilla.GetLexerCount(); i++)
{
scintilla.AppendText(Lexilla.GetLexerName(i) + Environment.NewLine);
} |
Beta Was this translation helpful? Give feedback.
-
@thehill383 is LexerName something you can use or do you think this behavior should come back into the library? |
Beta Was this translation helpful? Give feedback.
-
Moving this to a discussion instead of an issue, I don't think I'll be trying to do any quick fix for this. This needs a little more conversation if it is going to come back into the library and the current workaround seems fairly straight forward and easy. |
Beta Was this translation helpful? Give feedback.
-
Beside looking at the lexer names listing above OR executing the code to get supported lexer names, how can I get a list of supported names WHILE I am developing an application? I find it strange that I need to look it up here! |
Beta Was this translation helpful? Give feedback.
-
@HolterPhylo I'm adding an enumerated list back with the lexer names and you can use a function to return the correct lexername string variable now. So if you wanted to set C# you would do this: scintilla.LexerName = scintilla.GetLexerIDFromName(SCLEX_CSHARP); This should set "cpp" as the LexerName, would that work? |
Beta Was this translation helpful? Give feedback.
-
Closing discussion, I have added a helper for this behavior, if it does not work or should work differently, create an issue. |
Beta Was this translation helpful? Give feedback.
-
I am recieiving the following warning in project using Scintilla.NET 5.3.2.9, the latest version.
warning CS0618: 'Scintilla.Lexer' is obsolete: 'This property will get more obsolete as time passes as the Scintilla v.5+ now uses strings to define lexers. Please use the LexerName property instead.'
I cant find any documentation on what the valid Lexername values are.
On the page Automatic Syntax Highlighting it still shows the example scintilla.Lexer = Lexer.Cpp;
Beta Was this translation helpful? Give feedback.
All reactions