Even better php/javascript/html highlighting

This commit is contained in:
Tim Warren 2015-04-29 10:18:44 -04:00
parent 251fa33282
commit c428aa92d5
3 changed files with 43 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -29,6 +29,8 @@
"keyword4": [133, 153, 0], "keyword4": [133, 153, 0],
"keyword5": [42, 161, 152], "keyword5": [42, 161, 152],
"keyword6": [38, 139, 210], "keyword6": [38, 139, 210],
"keyword7": [211, 54, 130],
"keyword8": [108, 113, 196],
"comment": [147, 161, 161], "comment": [147, 161, 161],
"comment_line": [147, 161, 161], "comment_line": [147, 161, 161],
"comment_doc": [131, 148, 150], "comment_doc": [131, 148, 150],
@ -57,14 +59,14 @@
"bold": { "bold": {
"operator": true, "operator": true,
"label": true, "label": true,
"error": true, "preprocessor": true,
"preprocessor": true "comment_special": true
}, },
"italic": { "italic": {
"error": true "error": true
}, },
"underline": { "underline": {
"error": true
}, },
"line_numbers": { "line_numbers": {
"foreground": [147, 161, 161], "foreground": [147, 161, 161],

View File

@ -58,13 +58,9 @@ void EditPane::Highlight(wxString filePath)
{ {
this->fileName.Assign(filePath); this->fileName.Assign(filePath);
wxLogDebug("Highlighting method");
// Get the configuration name for the selected language // Get the configuration name for the selected language
string lang = this->GetLangByFile(); string lang = this->GetLangByFile();
wxLogDebug("Language selected: %s", lang);
this->StyleClearAll(); this->StyleClearAll();
if (lexerMap.count(lang) > 0) if (lexerMap.count(lang) > 0)
@ -81,6 +77,7 @@ void EditPane::Highlight(wxString filePath)
this->SetProperty("technology", "2"); this->SetProperty("technology", "2");
this->SetProperty("error.inline", "0"); this->SetProperty("error.inline", "0");
this->SetProperty("styling.within.preprocessor", "1"); this->SetProperty("styling.within.preprocessor", "1");
this->SetProperty("lexer.cpp.track.preprocessor", "1");
this->SetProperty("font.quality", "3"); // LCD Optimized this->SetProperty("font.quality", "3"); // LCD Optimized
// Apply the theme // Apply the theme
@ -504,6 +501,12 @@ void EditPane::_ApplyTheme(JsonValue lexer_map, int addtoi)
{ {
this->StyleSetItalic(i, this->GetThemeValue("italic", key).asBool()); this->StyleSetItalic(i, this->GetThemeValue("italic", key).asBool());
} }
// Underline
if (this->GetThemeValue("underline", key).isBool())
{
this->StyleSetUnderline(i, this->GetThemeValue("underline", key).asBool());
}
} }
} }