[geany/geany] 3afdba: Add Nim filetype (#2085)

Simon Krauter git-noreply at xxxxx
Sat Jun 8 17:44:18 UTC 2019


Branch:      refs/heads/master
Author:      Simon Krauter <trustablecode at gmail.com>
Committer:   Nick Treleaven <n at trelsoft.com>
Date:        Sat, 08 Jun 2019 17:44:18 UTC
Commit:      3afdba5716c5c5f2d4f1b9f8733ef392c759a3ff
             https://github.com/geany/geany/commit/3afdba5716c5c5f2d4f1b9f8733ef392c759a3ff

Log Message:
-----------
Add Nim filetype (#2085)

* Add Nim filetype

Add support for the Nim programming language using the Python lexer.
Nim website: https://nim-lang.org/

* Correct file name

* Add filetypes.Nim.conf to Makefile.am

As requested by b4n

* Remove unneeded lexer_properties and indentation width

As requested by b4n

* Fix run_cmd

* Improved keywords


Modified Paths:
--------------
    data/Makefile.am
    data/filedefs/filetypes.Nim.conf
    data/filetype_extensions.conf

Modified: data/Makefile.am
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -49,6 +49,7 @@ filetypes = \
 	filedefs/filetypes.makefile \
 	filedefs/filetypes.markdown \
 	filedefs/filetypes.matlab \
+	filedefs/filetypes.Nim.conf \
 	filedefs/filetypes.nsis \
 	filedefs/filetypes.objectivec \
 	filedefs/filetypes.pascal \


Modified: data/filedefs/filetypes.Nim.conf
29 lines changed, 29 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,29 @@
+# For complete documentation of this file, please see Geany's main documentation
+
+[styling=Python]
+
+[keywords]
+
+primary=addr as asm atomic bind block break case cast const continue converter defer discard distinct div do elif else end enum except export finally for from func generic if import include interface iterator let macro method mixin mod notin object of out proc raise return shl shr static template try type using var when while with without yield seq array tuple ref ptr not and xor in or is isnot new
+
+identifiers=bool byte char int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 string nil true false result echo assert
+
+[settings]
+
+extension=nim
+comment_single=#
+comment_use_indent=true
+tag_parser=Python
+lexer_filetype=Python
+
+[indentation]
+
+type=0
+
+[build-menu]
+
+# %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=nim c "%f"
+run_cmd="./%e"


Modified: data/filetype_extensions.conf
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -47,6 +47,7 @@ Lua=*.lua;
 Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
 Markdown=*.mdml;*.markdown;*.md;*.mkd;*.mkdn;*.mdwn;*.mdown;*.mdtxt;*.mdtext;
 Matlab/Octave=*.m;
+Nim=*.nim;
 NSIS=*.nsi;*.nsh;
 Objective-C=*.m;*.mm;*.h;
 Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;



--------------
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