summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/CppEditor.mimetypes.xml
blob: 77d80cc81a5b8eb5261667c83bd3c7cd1e350563 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
    <mime-type type="text/vnd.nvidia.cuda.csrc">
        <sub-class-of type="text/x-csrc"/>
        <comment>NVIDIA CUDA C source code</comment>
        <glob pattern="*.cu"/>
    </mime-type>

    <mime-type type="text/x-chdr">
        <comment>C header</comment>
        <sub-class-of type="text/x-csrc"/>
        <!-- reduce weight from freedesktop to avoid conflict with text/x-c++hdr -->
        <glob pattern="*.h" weight="30"/>
    </mime-type>

    <!-- Those are used to find matching headers by the CppTools plugin,
         so, they should match -->
    <mime-type type="text/x-c++hdr">
        <sub-class-of type="text/x-chdr"/>
        <comment>C++ header</comment>
        <glob pattern="*.hh"/>
        <glob pattern="*.hxx"/>
        <glob pattern="*.h++"/>
        <glob pattern="*.hpp"/>
        <glob pattern="*.hp"/>
        <!-- Additions to freedesktop: -->
        <glob pattern="*.h"/>
        <glob pattern="*.H"/>
        <!-- Find include guards of header files without extension, for
             example, STL ones like <string>. Those can have a big initial
             comment exceeding 1000 chars, though. -->
        <magic priority="50">
           <match value="#ifndef " type="string" offset="0:2000"/>
           <match value="#if " type="string" offset="0:2000"/>
           <match value="#include " type="string" offset="0:2000"/>
        </magic>
    </mime-type>

    <mime-type type="text/x-c++src">
        <comment>C++ source code</comment>
        <sub-class-of type="text/x-csrc"/>
        <comment>C++ source code</comment>
        <glob pattern="*.cpp"/>
        <glob pattern="*.cxx"/>
        <glob pattern="*.cc"/>
        <glob pattern="*.C" case-sensitive="true"/>
        <glob pattern="*.c++"/>
        <!-- Additions to freedesktop: -->
        <glob pattern="*.cp"/>
        <glob pattern="*.inl"/>
        <glob pattern="*.qdoc"/>
        <glob pattern="*.tcc"/>
        <glob pattern="*.tpp"/>
        <glob pattern="*.t++"/>
        <glob pattern="*.txx"/>
        <magic priority="30">
        <match value="-*- C++ -*-" type="string" offset="0:30"/>
        </magic>
    </mime-type>

  <mime-type type="text/x-moc">
    <comment>Qt MOC file</comment>
    <acronym>Qt MOC</acronym>
    <expanded-acronym>Qt Meta Object Compiler</expanded-acronym>
    <!-- Fix to freedesktop: moc is C++ source -->
    <sub-class-of type="text/x-c++src"/>
    <glob pattern="*.moc"/>
  </mime-type>

    <mime-type type="text/x-objc++src">
         <comment>Objective-C++ source code</comment>
         <sub-class-of type="text/x-c++src"/>
         <sub-class-of type="text/x-objcsrc"/>
         <glob pattern="*.mm" weight="70"/>
    </mime-type>

</mime-info>