CppEditor.mimetypes.xml 1.99 KB
Newer Older
con's avatar
con committed
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
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
    <mime-type type="text/x-csrc">
        <sub-class-of type="text/plain"/>
        <comment>C Source file</comment>
        <glob pattern="*.c"/>
    </mime-type>

    <!-- A C Header file is virtually undistinguishable from the C++ header  -->
    <mime-type type="text/x-chdr">
        <sub-class-of type="text/x-csrc"/>
        <comment>C Header file</comment>
        <glob pattern="*.h"/>
    </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 file</comment>
        <comment>C++ header</comment>
        <glob pattern="*.h"/>
        <glob pattern="*.hh"/>
        <glob pattern="*.hxx"/>
        <glob pattern="*.h++"/>
        <glob pattern="*.H"/>
        <glob pattern="*.hpp"/>
        <glob pattern="*.hp"/>
        <!-- Find include guards of header files without extension, for
             example, STL ones like <string> -->
        <magic priority="50">
           <match value="#ifndef" type="string" offset="0:1000"/>
        </magic>
    </mime-type>

    <mime-type type="text/x-c++src">
        <comment>C++ Source file</comment>
        <sub-class-of type="text/x-csrc"/>
        <comment>C++ source code</comment>
        <glob pattern="*.cpp"/>
        <glob pattern="*.cc"/>
        <glob pattern="*.cxx"/>
        <glob pattern="*.c++"/>
        <glob pattern="*.C"/>
45
        <glob pattern="*.inl"/>
46
        <glob pattern="*.moc"/>
47
        <glob pattern="*.qdoc"/>
con's avatar
con committed
48
    </mime-type>
49
50
51
52
53
54
55
56
57
58
59

    <mime-type type="text/x-objcsrc">
         <comment>Objective-C source code</comment>
         <sub-class-of type="text/x-csrc"/>
         <magic priority="30">
         <match value="#import" type="string" offset="0"/>
         </magic>
         <glob pattern="*.m"/>
         <glob pattern="*.mm"/>
    </mime-type>

con's avatar
con committed
60
</mime-info>