Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added: custom style for SQL

  • Loading branch information...
commit cf93e011713cd0545c6ba8d8d200c2e564378952 1 parent 765ef21
mezomish authored
Showing with 26 additions and 0 deletions.
  1. +13 −0 hlschemes/sql.xml
  2. +13 −0 src/app/qsci/LexerStorage.cpp
View
13 hlschemes/sql.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE JuffScheme>
+<JuffScheme>
+<scheme name="SQL">
+ <style name="comment" color="#108040" italic="true" />
+ <style name="keyword" color="#141484" bold="true" />
+ <style name="number" color="#0080a0" />
+ <style name="operator" color="#400000" />
+ <style name="singleString" color="#a00000" />
+ <style name="doubleString" color="#a000c0" />
+ <style name="identifier" color="#303030" />
+</scheme>
+</JuffScheme>
View
13 src/app/qsci/LexerStorage.cpp
@@ -467,6 +467,19 @@ void LSInterior::readCustomStyle(const QString& name) {
<< Rule(styles["error"], QList<int>() << QsciLexerRuby::Error);
schemes_[name] = scheme;
}
+ else if ( name.compare("SQL") == 0 ) {
+ scheme = new Scheme();
+ scheme->defaultStyle = styles["default"];
+ scheme->rules << Rule(styles["comment"], QList<int>() << QsciLexerSQL::Comment << QsciLexerSQL::CommentDoc << QsciLexerSQL::CommentLine << QsciLexerSQL::CommentLineHash)
+ << Rule(styles["number"], QList<int>() << QsciLexerSQL::Number)
+ << Rule(styles["keyword"], QList<int>() << QsciLexerSQL::Keyword)
+ << Rule(styles["operator"], QList<int>() << QsciLexerSQL::Operator)
+ << Rule(styles["identifier"], QList<int>() << QsciLexerSQL::Identifier)
+ << Rule(styles["singleString"], QList<int>() << QsciLexerSQL::SingleQuotedString)
+ << Rule(styles["doubleString"], QList<int>() << QsciLexerSQL::DoubleQuotedString)
+ ;
+ schemes_[name] = scheme;
+ }
else if ( name.compare("TeX") == 0 ) {
scheme = new Scheme();
scheme->defaultStyle = styles["default"];
Please sign in to comment.
Something went wrong with that request. Please try again.