|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +
|
| 4 | + This file is part of GtkSourceView |
| 5 | +
|
| 6 | + Author: Paolo Maggi <[email protected]> |
| 7 | + Copyright (C) 2003 Paolo Maggi <[email protected]> |
| 8 | + Copyright (C) 2006 Luca Cavalli <[email protected]> |
| 9 | +
|
| 10 | + GtkSourceView is free software; you can redistribute it and/or |
| 11 | + modify it under the terms of the GNU Lesser General Public |
| 12 | + License as published by the Free Software Foundation; either |
| 13 | + version 2.1 of the License, or (at your option) any later version. |
| 14 | +
|
| 15 | + GtkSourceView is distributed in the hope that it will be useful, |
| 16 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | + Lesser General Public License for more details. |
| 19 | +
|
| 20 | + You should have received a copy of the GNU Lesser General Public |
| 21 | + License along with this library; if not, write to the Free Software |
| 22 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 23 | +
|
| 24 | +--> |
| 25 | +<language id="nemo_action" _name="Nemo Action" version="2.0" _section="Others"> |
| 26 | + <metadata> |
| 27 | + <property name="mimetypes">application/nemo-action</property> |
| 28 | + <property name="globs">*.nemo_action</property> |
| 29 | + <property name="line-comment-start">#</property> |
| 30 | + </metadata> |
| 31 | + |
| 32 | + <styles> |
| 33 | + <style id="group" _name="Group" map-to="def:keyword"/> |
| 34 | + <!-- Translators: "Key" here means key value, that is the left hand |
| 35 | + side in a myoption=something line in a .desktop file --> |
| 36 | + <style id="key" _name="Key" map-to="def:type"/> |
| 37 | + <style id="language" _name="Translation" map-to="def:decimal"/> |
| 38 | + <style id="number" _name="Number" map-to="def:floating-point"/> |
| 39 | + <style id="boolean" _name="Boolean" map-to="def:floating-point"/> |
| 40 | + <style id="exec-parameter" _name="Exec parameter" map-to="def:floating-point"/> |
| 41 | + <style id="encoding" _name="Encoding" map-to="def:floating-point"/> |
| 42 | + </styles> |
| 43 | + |
| 44 | + <definitions> |
| 45 | + <define-regex id="key-suffix">(?=(\[[a-zA-Z_]+\])?\s*=\s*)</define-regex> |
| 46 | + |
| 47 | + <context id="group" style-ref="group"> |
| 48 | + <start>^\[</start> |
| 49 | + <end>\]$</end> |
| 50 | + </context> |
| 51 | + |
| 52 | + <context id="language" style-ref="language"> |
| 53 | + <match>\[[a-zA-Z_]+\]</match> |
| 54 | + </context> |
| 55 | + |
| 56 | + <context id="boolean" style-ref="boolean"> |
| 57 | + <keyword>true</keyword> |
| 58 | + <keyword>false</keyword> |
| 59 | + </context> |
| 60 | + |
| 61 | + <context id="exec-parameter" style-ref="exec-parameter"> |
| 62 | + <match>%[FUNPfp%]</match> |
| 63 | + </context> |
| 64 | + |
| 65 | + <context id="encoding" style-ref="encoding"> |
| 66 | + <keyword>UTF\-8</keyword> |
| 67 | + <keyword>Legacy\-Mixed</keyword> |
| 68 | + </context> |
| 69 | + |
| 70 | + <context id="number" style-ref="number"> |
| 71 | + <match>(.\b[0-9]+([Ll]?|[Ff]?)\b)|(b[0-9]*\.\W)</match> |
| 72 | + </context> |
| 73 | + |
| 74 | + <context id="standard-key" style-ref="key"> |
| 75 | + <prefix>^_?</prefix> |
| 76 | + <suffix>\%{key-suffix}</suffix> |
| 77 | + <keyword>Active</keyword> |
| 78 | + <keyword>Name</keyword> |
| 79 | + <keyword>Comment</keyword> |
| 80 | + <keyword>Exec</keyword> |
| 81 | + <keyword>Icon-Name</keyword> |
| 82 | + <keyword>Stock-Id</keyword> |
| 83 | + <keyword>Selection</keyword> |
| 84 | + <keyword>Extensions</keyword> |
| 85 | + <keyword>Mimetypes</keyword> |
| 86 | + <keyword>Separator</keyword> |
| 87 | + <keyword>Quote</keyword> |
| 88 | + <keyword>Dependencies</keyword> |
| 89 | + <keyword>Conditions</keyword> |
| 90 | + <keyword>EscapeSpaces</keyword> |
| 91 | + <keyword>Terminal</keyword> |
| 92 | + </context> |
| 93 | + |
| 94 | + <context id="non-standard-key" style-ref="key"> |
| 95 | + <match>^_?X\-[a-zA-Z\-]+\%{key-suffix}</match> |
| 96 | + </context> |
| 97 | + |
| 98 | + <context id="key"> |
| 99 | + <include> |
| 100 | + <context ref="standard-key"/> |
| 101 | + <context ref="non-standard-key"/> |
| 102 | + </include> |
| 103 | + </context> |
| 104 | + |
| 105 | + <context id="nemo_action"> |
| 106 | + <include> |
| 107 | + <context ref="def:shell-like-comment"/> |
| 108 | + <context ref="group"/> |
| 109 | + <context ref="key"/> |
| 110 | + <context id="lang-and-value" end-at-line-end="true"> |
| 111 | + <start>(\[[a-zA-Z_]+\])?\s*=\s*</start> |
| 112 | + <include> |
| 113 | + <context sub-pattern="1" where="start" style-ref="language"/> |
| 114 | + <context ref="boolean"/> |
| 115 | + <context ref="exec-parameter"/> |
| 116 | + <context ref="encoding"/> |
| 117 | + <context ref="number"/> |
| 118 | + </include> |
| 119 | + </context> |
| 120 | + </include> |
| 121 | + </context> |
| 122 | + </definitions> |
| 123 | +</language> |
0 commit comments