aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/syntax_rules
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-09 14:04:11 -0400
committerKen Moore <ken@ixsystems.com>2017-06-09 14:04:11 -0400
commitbbf81abc29e626b654366b7083babe9f355709ea (patch)
treef62602228809158e4e48d465f58f323b453a673c /src-qt5/desktop-utils/lumina-textedit/syntax_rules
parentGet the SyntaxFile loading mechanisms all setup. (diff)
downloadlumina-bbf81abc29e626b654366b7083babe9f355709ea.tar.gz
lumina-bbf81abc29e626b654366b7083babe9f355709ea.tar.bz2
lumina-bbf81abc29e626b654366b7083babe9f355709ea.zip
Get the new syntax highlighting support framework functional with the C++ rules files as the example (still need to convert the other existing rulesets over to the new format).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntax_rules')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax109
1 files changed, 53 insertions, 56 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax
index c09fbec2..9a235ae3 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax
@@ -6,60 +6,57 @@
# ===================================
{
- "meta" : {
- "name" : "C++",
- "file_suffix" : ["cpp","hpp","c", "h" ]
- },
- "format" : {
- "font_type" : "monospace",
- "line_wrap" : false
- },
- "rules" : [
- {
- "name" : "multi-line comment",
- "regex_start" : "/\\*",
- "regex_end" : "\\*/",
- "foreground" : "colors/comment"
- },
- {
- "name" : "single-line comment",
- "regex" : "//[^\n]*",
- "foreground" : "colors/comment",
- },
- {
- "name" : "keywords",
- "words" : ["char", "class", "const", "double", "enum", "explicit", "extern", "float", "friend", "inline", "int", "long", "namespace", "operator", "private", "protected", "public" , "short", "signals", "signed", "slots", "static", "struct", "template", "typedef", "typename", "union", "unsigned", "virtual", "void", "volatile", "true", "false", "bool"],
- "foreground" : "colors/keyword",
- "background" : "none",
- "font_weight" : "bold"
- },
- {
- "name" : "alternate keywords",
- "words" : ["for", "while", "switch", "case", "continue", "break", "if", "else", "return", "exit"],
- "foreground" : "colors/altkeyword",
- "background" : "none",
- "font_weight" : "bold"
- },
- {
- "name" : "class names",
- "regex" : "\\b[A-Za-z0-9_-\\.]+(?=::)\\b",
- "foreground" : "colors/class",
- "font_weight" : "bold"
- },
- {
- "name" : "function names",
- "regex" : "\\b[A-Za-z0-9_]+(?=\\()",
- "foreground" : "colors/function"
- },
- {
- "name" : "text",
- "regex" : "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'",
- "foreground" : "colors/text"
- },
- {
- "name" : "preprocessor",
- "regex" : "^[\\s]*#[^\n]*",
- "foreground" : "colors/preprocessor"
- }
- ]
+ "meta": {
+ "name": "C++",
+ "file_suffix": ["cpp", "hpp", "c", "h"]
+ },
+ "format": {
+ "line_wrap": false,
+ "highlight_whitespace_eol": true
+ },
+ "rules": [{
+ "name": "multi-line comment",
+ "regex_start": "/\\*",
+ "regex_end": "\\*/",
+ "foreground": "colors/comment"
+ },
+ {
+ "name": "single-line comment",
+ "regex": "//[^\n]*",
+ "foreground": "colors/comment"
+ },
+ {
+ "name": "keywords",
+ "words": ["char", "class", "const", "double", "enum", "explicit", "extern", "float", "friend", "inline", "int", "long", "namespace", "operator", "private", "protected", "public", "short", "signals", "signed", "slots", "static", "struct", "template", "typedef", "typename", "union", "unsigned", "virtual", "void", "volatile", "true", "false", "bool"],
+ "foreground": "colors/keyword",
+ "font_weight": "bold"
+ },
+ {
+ "name": "alternate keywords",
+ "words": ["for", "while", "switch", "case", "continue", "break", "if", "else", "return", "exit"],
+ "foreground": "colors/altkeyword",
+ "font_weight": "bold"
+ },
+ {
+ "name": "class names",
+ "regex": "\\b[A-Za-z0-9_-\\.]+(?=::)\\b",
+ "foreground": "colors/class",
+ "font_weight": "bold"
+ },
+ {
+ "name": "function names",
+ "regex": "\\b[A-Za-z0-9_]+(?=\\()",
+ "foreground": "colors/function"
+ },
+ {
+ "name": "text",
+ "regex": "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'",
+ "foreground": "colors/text"
+ },
+ {
+ "name": "preprocessor",
+ "regex": "^[\\s]*#[^\n]*",
+ "foreground": "colors/preprocessor"
+ }
+ ]
}
bgstack15