-
Notifications
You must be signed in to change notification settings - Fork 0
/
todotxt.lang
77 lines (60 loc) · 2.47 KB
/
todotxt.lang
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"?>
<!--
GtkSourceView syntax highlighting for the todo.txt format.
See also: http://todotxt.org/
Author: Eric Weik <ericw@newriversdigital.com>
Copyright (C) 2018 Eric Weik <ericw@newriversdigital.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="todo" name="todo-txt" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/plain</property>
<property name="globs">todo.txt*</property>
<property name="line-comment-start">x </property>
</metadata>
<styles>
<style id="done" name="Done" map-to="def:comment"/>
<style id="priority" name="Priority" map-to="def:keyword"/>
<style id="date" name="Date" map-to="def:constant"/>
<style id="tag" name="Tag" map-to="def:type"/>
<style id="place" name="Place" map-to="def:string"/>
<style id="metadata" name="Metadata" map-to="def:preprocessor"/>
</styles>
<default-regex-options case-sensitive="false" />
<definitions>
<context id="todo">
<include>
<context id="line-done" style-ref="done" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>^x </start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="priority" style-ref="priority">
<match>\([A-Z]\)</match>
</context>
<context id="date" style-ref="date">
<match>[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]</match>
</context>
<context id="tag" style-ref="tag">
<match>\+[[:graph:]]{1,}</match>
</context>
<context id="place" style-ref="place">
<match>\@[[:graph:]]{1,}</match>
</context>
<context id="metadata" style-ref="metadata">
<match>[^\s\\]*:[^\s\\]*</match>
</context>
</include>
</context>
</definitions>
</language>