Commit 7b0d9285 authored by Christian Hergert's avatar Christian Hergert
Browse files

language-specs: add suggested suffix/name properties

For a number of languages, we can help text editors choose a reasonable
suffix for the filename using metadata properties. GNOME Text Editor, for
example, will use this to prime the save changes dialog.

Use gtk_source_language_get_property(lang, "suggested-name") first to get
the suggested name, and if that is NULL, use "suggested-suffix" with a
generated prefix (or leave it empty with the cursor set before the suffix
in the filename entry).
parent a823764c
Pipeline #398806 passed with stages
in 2 minutes and 44 seconds
......@@ -24,6 +24,7 @@
<metadata>
<property name="globs">Makefile.am;GNUmakefile.am</property>
<property name="line-comment-start">#</property>
<property name="suggested-name">Makefile.am</property>
</metadata>
<!--
......
......@@ -28,6 +28,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.c</property>
</metadata>
<styles>
......
......@@ -28,6 +28,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.h</property>
</metadata>
<!--
......
......@@ -29,6 +29,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.cc</property>
</metadata>
<styles>
......
......@@ -28,6 +28,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.hh</property>
</metadata>
<definitions>
......
......@@ -30,6 +30,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.cs</property>
</metadata>
<styles>
......
......@@ -29,6 +29,7 @@
<property name="globs">*.css;*.CSSL</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.css</property>
</metadata>
<styles>
......
......@@ -24,6 +24,7 @@
<metadata>
<property name="mimetypes">text/csv</property>
<property name="globs">*.csv</property>
<property name="suggested-suffix">.csv</property>
</metadata>
<styles>
......
......@@ -27,6 +27,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.dart</property>
</metadata>
<styles>
......
......@@ -26,6 +26,7 @@
<property name="mimetypes">application/x-gnome-app-info;application/x-desktop</property>
<property name="globs">*.desktop;*.kdelnk</property>
<property name="line-comment-start">#</property>
<property name="suggested-suffix">.desktop</property>
</metadata>
<styles>
......
......@@ -23,6 +23,7 @@
<property name="globs">*.erb</property>
<property name="block-comment-start">&lt;%#</property>
<property name="block-comment-end">%&gt;</property>
<property name="suggested-suffix">.erb</property>
</metadata>
<styles>
......
......@@ -21,6 +21,7 @@ or visit this link <http://www.gnu.org/licenses/>.
<property name="mimetypes">text/x-fish</property>
<property name="globs">*.fish</property>
<property name="line-comment-start">#</property>
<property name="suggested-suffix">.fish</property>
</metadata>
<styles>
......
......@@ -34,6 +34,7 @@ http://www.opengl.org/registry/doc/GLSLangSpec.4.00.7.pdf
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.glsl</property>
</metadata>
<styles>
......
......@@ -28,6 +28,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.go</property>
</metadata>
<styles>
......@@ -307,4 +308,4 @@
</context>
</definitions>
</language>
\ No newline at end of file
</language>
......@@ -26,6 +26,7 @@
<property name="mimetypes">text/x-haskell</property>
<property name="globs">*.hs</property>
<property name="line-comment-start">--</property>
<property name="suggested-suffix">.hs</property>
</metadata>
<styles>
......
......@@ -28,6 +28,7 @@
<property name="globs">*.html;*.htm</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
<property name="suggested-suffix">.html</property>
</metadata>
<styles>
......
......@@ -28,6 +28,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.java</property>
</metadata>
<styles>
......
......@@ -31,6 +31,7 @@
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.js</property>
</metadata>
<styles>
......
......@@ -30,6 +30,7 @@
<metadata>
<property name="mimetypes">application/json</property>
<property name="globs">*.json;*.geojson;*.topojson</property>
<property name="suggested-suffix">.json</property>
</metadata>
<styles>
......
......@@ -26,6 +26,7 @@
<property name="mimetypes">text/x-tex</property>
<property name="globs">*.tex;*.ltx;*.sty;*.cls;*.dtx;*.ins;*.bbl</property>
<property name="line-comment-start">%</property>
<property name="suggested-suffix">.tex</property>
</metadata>
<styles>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment