[geany/geany] d031d6: Update Nim filetype config (#2988)

Zoom git-noreply at xxxxx
Fri Dec 10 23:49:24 UTC 2021


Branch:      refs/heads/master
Author:      Zoom <ZoomRmc at users.noreply.github.com>
Committer:   GitHub <noreply at github.com>
Date:        Fri, 10 Dec 2021 23:49:24 UTC
Commit:      d031d6f2fcb12e9670dade20fc9a657dedb5a5c2
             https://github.com/geany/geany/commit/d031d6f2fcb12e9670dade20fc9a657dedb5a5c2

Log Message:
-----------
Update Nim filetype config (#2988)

* Update Nim filetype config

Keywords taken from official Manual.
Identifiers list expanded with:
1. Some basic types from the System module, which is always implicitly imported.
2. Additional keywords (`lent, spawn, parallel`) from Nim experimental features.

Styling and build-menu settings taken from @HJarausch config in #2669

* Fixup: Nim filetype: add `sink`

* Add multiline comments to Nim filetype

...which won't work until the Nim lexer from lexilla is added.


Modified Paths:
--------------
    data/filedefs/filetypes.Nim.conf

Modified: data/filedefs/filetypes.Nim.conf
59 lines changed, 47 insertions(+), 12 deletions(-)
===================================================================
@@ -1,29 +1,64 @@
 # For complete documentation of this file, please see Geany's main documentation
 
-[styling=Python]
-
 [keywords]
+# all items must be in one line
+primary=addr and as asm bind block break case cast concept const continue converter defer discard distinct div do elif else end enum except export finally for from func if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while xor yield
+# additional keywords, will be highlighted with style "word2"
+identifiers=array auto bool byte char int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 Natural Ordinal Positive seq string nil true false result echo openArray lent sink assert doAssert spawn parallel
 
-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
+[lexer_properties]
+fold.quotes.nim=1
+lexer.nim.keywords2.no.sub.identifiers=1
 
 [settings]
-
+# default extension used when saving files
 extension=nim
+# MIME type
+mime_type=text/x-nim
+# single comment char, like # in this file
 comment_single=#
 comment_use_indent=true
+comment_open=#[
+comment_close=]#
 tag_parser=Python
 lexer_filetype=Python
 
 [indentation]
-
+width=2
+# 0 is spaces, 1 is tabs, 2 is tab & spaces
 type=0
 
 [build-menu]
+FT_00_LB=nim c
+FT_00_CM=nim c "%f"
+FT_00_WD=%d
+FT_02_LB=_Lint
+FT_02_CM=nimpretty --maxLineLen:80 "%f"
+EX_01_WD=
+error_regex=(.+)\(([0-9]+),\s+([0-9]+)\)\s+Error
+FT_01_LB=nim r
+FT_01_CM=nim r "%f"
+FT_01_WD=%d
 
-# %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"
+[styling]
+# Edit these in the colorscheme .conf file instead
+default=default
+commentline=comment_line
+number=number_1
+string=string_1
+character=character
+word=keyword_1
+triple=string_2
+tripledouble=string_2
+classname=type
+defname=function
+operator=operator
+identifier=identifier_1
+commentblock=comment
+stringeol=string_eol
+word2=keyword_2
+decorator=decorator
+fstring=string_1
+fcharacter=character
+ftriple=string_2
+ftripledouble=string_2



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