QScintilla/Lexers/__init__.py

changeset 5969
584c21b6587a
parent 5651
982465f8389c
child 6048
82ad8ec9548c
--- a/QScintilla/Lexers/__init__.py	Sun Nov 12 19:42:02 2017 +0100
+++ b/QScintilla/Lexers/__init__.py	Mon Nov 13 20:20:06 2017 +0100
@@ -130,6 +130,9 @@
                    "lexerPOV.png"],
         "Properties": [QCoreApplication.translate('Lexers', "Properties"),
                        'dummy.ini', "lexerProperties.png"],
+        "Protocol": [QCoreApplication.translate('Lexers',
+                                                "Protocol (protobuf)"),
+                     'dummy.proto', "protobuf.png"],
         "Python2": [QCoreApplication.translate('Lexers', "Python2"),
                     'dummy.py', "lexerPython.png"],
         "Python3": [QCoreApplication.translate('Lexers', "Python3"),
@@ -334,6 +337,9 @@
                 from .LexerMarkdown import LexerMarkdown
                 return LexerMarkdown(parent)
             
+            elif language == "Protocol":
+                return __getPygmentsLexer(parent, name="Protocol Buffer")
+            
             elif language in LexerRegistry:
                 return LexerRegistry[language][2](parent)
             
@@ -395,6 +401,9 @@
             'IDL Files (*.idl)'),
         QCoreApplication.translate(
             'Lexers',
+            'Protocol Files (*.proto)'),
+        QCoreApplication.translate(
+            'Lexers',
             'C Files (*.h *.c)'),
         QCoreApplication.translate(
             'Lexers',
@@ -579,6 +588,9 @@
             "IDL Files (*.idl)"),
         QCoreApplication.translate(
             'Lexers',
+            'Protocol Files (*.proto)'),
+        QCoreApplication.translate(
+            'Lexers',
             "C Files (*.c)"),
         QCoreApplication.translate(
             'Lexers',
@@ -881,6 +893,7 @@
         '*.e6q': "XML",
         '*.e6s': "XML",
         '*.e6t': "XML",
+        '*.proto': "Protocol",
     }
     
     if QSCINTILLA_VERSION() >= 0x020802:

eric ide

mercurial