[geany/geany] b17b4b: Added the Rust filetype

dobkeratops git-noreply at xxxxx
Tue Jan 14 17:50:37 UTC 2014


Branch:      refs/heads/master
Author:      dobkeratops <dobkeratopsgit at gmail.com>
Committer:   SiegeLord <slabode at aim.com>
Date:        Tue, 14 Jan 2014 17:50:37 UTC
Commit:      b17b4be1260e8828f62c56c87cf8bf886cbbf3b4
             https://github.com/geany/geany/commit/b17b4be1260e8828f62c56c87cf8bf886cbbf3b4

Log Message:
-----------
Added the Rust filetype


Modified Paths:
--------------
    data/filetypes.rust
    src/filetypes.c
    src/filetypes.h

Modified: data/filetypes.rust
51 files changed, 51 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,51 @@
+# For complete documentation of this file, please see Geany's main documentation
+[styling=C]
+
+[keywords]
+# all items must be in one line
+primary=fn type as break const copy do else enum extern fail for if impl let log loop match mod mut priv pub ref return static struct trait unsafe use while in continue alignof be offsetof pure sizeof typeof yield
+secondary=bool int uint i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str Self self
+
+[lexer_properties]
+styling.within.preprocessor=1
+lexer.cpp.track.preprocessor=0
+
+[settings]
+lexer_filetype=C
+
+# default extension used when saving files
+extension=rs
+
+# the following characters are these which a "word" can contains, see documentation
+#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+
+# single comments, like # in this file
+comment_single=//
+# multiline comments
+comment_open=/*
+comment_close=*/
+
+# set to false if a comment character/string should start at column 0 of a line, true uses any
+# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
+	#command_example();
+# setting to false would generate this
+#	command_example();
+# This setting works only for single line comments
+comment_use_indent=true
+
+# context action command (please see Geany's main documentation for details)
+context_action_cmd=
+
+[indentation]
+#width=4
+# 0 is spaces, 1 is tabs, 2 is tab & spaces
+#type=1
+
+[build_settings]
+# %f will be replaced by the complete filename
+# %e will be replaced by the filename without extension
+# (use only one of it at one time)
+compiler=rustc "%f"
+linker=rustc -o "%e" "%f"
+run_cmd="./%e"
+


Modified: src/filetypes.c
9 files changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -522,6 +522,15 @@ static void init_builtin_filetypes(void)
 	ft->name = g_strdup("PowerShell");
 	filetype_make_title(ft, TITLE_SOURCE_FILE);
 	ft->group = GEANY_FILETYPE_GROUP_SCRIPT;
+
+#define RUST
+	ft = filetypes[GEANY_FILETYPES_RUST];
+	ft->lang = 45;
+	ft->name = g_strdup("Rust");
+	filetype_make_title(ft, TITLE_SOURCE_FILE);
+	ft->mime_type = g_strdup("text/x-rustsrc");
+	ft->group = GEANY_FILETYPE_GROUP_COMPILED;
+
 }
 
 


Modified: src/filetypes.h
1 files changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -94,6 +94,7 @@
 	GEANY_FILETYPES_ABAQUS,
 	GEANY_FILETYPES_BATCH,
 	GEANY_FILETYPES_POWERSHELL,
+	GEANY_FILETYPES_RUST,
 	/* ^ append items here */
 	GEANY_MAX_BUILT_IN_FILETYPES	/* Don't use this, use filetypes_array->len instead */
 }



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list