Skip to content

Instantly share code, notes, and snippets.

@xaedes
Created July 4, 2022 18:48
Show Gist options
  • Save xaedes/6bdfacf6ea71a8309eb65ae6e4ed23f1 to your computer and use it in GitHub Desktop.
Save xaedes/6bdfacf6ea71a8309eb65ae6e4ed23f1 to your computer and use it in GitHub Desktop.
C++ Compile Error "Log Hightlight.sublime-settings"
{
/* Configuration ____________________________________________
*/
// enable context menu
"context_menu": true,
// Auto Highlight for a log file, build window
"auto_highlight" : true,
// Output panel list for Auto Highlight
"auto_highlight_output_panel": ["exec"], // exec = build
/* log list _________________________________________________
*/
"log_list" : {
"cpp_compiler_error" : // specify name as yours
{
"type" : "compile", // "compile" - link, bookmark (icon) are usable, "system" - only for highlight
"extension" : [ "*.log", ".vcs.log", ".cpp.log", "message*" ],
"output.panel" : [ "exec" ], // exec - to apply to build results
"use_link" : true,
"search_base": {
"enable" : true, // false : when using absolute path
"ignore_dir" : [""], // hidden folders are ignored as default, like .git, .svn
"max_scan_path" : 1000,
},
"bookmark" : {
"enable" : true, // false : do not display icons too
"goto_error" : true, // automatically goto 1st error line
},
"severity" :
{
"error" : { // specify name as yours
"enable" : true,
"pattern" : [ // [ "begin regex", "end regex" ] or [ "match regex", "" ]
// examples
[ "^Error-\\[", "^\\s*[\\n]" ], // Error-[ ~ next empty line (multi-line)
[ "^{{{LINK}}}?[^\\r\\n]*?(?i)error", "[\\r\\n]" ], // a line including case-insensitive 'error' with or without a link in front of 'error'
[ "^\\w+:\\s*\\*E", "[\\r\\n]" ] // ...: *E ... (single line)
// <-- remove, change, add more patterns here -->
],
"color" : { // ["foreground", "background"]
"base" : ["#F92672", ""], // error message
"link" : ["#BB2A2A", ""], // link in error message
"quote" : ["#4F99D3", ""], // quote in error message
},
"icon" : "Danish Royalty/error.png", // remove "icon" not to use icon, "dot", "circle" "bookmark" are possible
},
"warning" : { // specify name as yours
"enable" : true,
"pattern" : [
// examples
[ "^Warning-\\[", "^\\s*[\\n]" ],
[ "^{{{LINK}}}?[^\\r\\n]*?(?i)warning", "[\\r\\n]" ],
[ "^\\w+:\\s*\\*W", "[\\r\\n]" ]
],
"color" : {
"base" : ["#A1B347", ""],
"link" : ["#FD971F", ""],
"quote" : ["#4F99D3", ""],
},
"icon" : "Danish Royalty/warning.png",
},
"note" : { // specify name as yours
"enable" : true,
"pattern" : [
// examples
[ "^Note:\\[", "^\\s*[\\n]" ],
[ "^{{{LINK}}}?[^\\r\\n]*?(?i)note", "[\\r\\n]" ],
[ "^\\w+:\\s*\\*N", "[\\r\\n]" ]
],
"color" : {
"base" : ["#A1B347", ""],
"link" : ["#E18315", ""],
"quote" : ["#4F99D3", ""],
},
},
"required_from" : { // specify name as yours
"enable" : true,
"pattern" : [ // [ "begin regex", "end regex" ] or [ "match regex", "" ]
[ "^{{{LINK}}}?[^\\r\\n]*?(?i)required\\s+from", "[\\r\\n]" ],
],
"color" : { // ["foreground", "background"]
"base" : ["#26C5F9", ""], // error message
"link" : ["#1B35A6", ""], // link in error message
"quote" : ["#4F99D3", ""], // quote in error message
},
},
},
"theme": {
"foreground" : "#121212",
"caret" : "#F29718",
"selection" : "#3A5166",
"selectionBorder" : "#181E26",
"lineHighlight" : "",
}
},
// <-- remove, change, add more log list here -->
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment