Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nix support #3954

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add Nix support
  • Loading branch information
techee committed Nov 24, 2024
commit 13a5b085af525f6aa9e90aa1ae1484db9e7712f2
1 change: 1 addition & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ filetypes_dist = \
filedefs/filetypes.makefile \
filedefs/filetypes.markdown \
filedefs/filetypes.matlab \
filedefs/filetypes.nix \
filedefs/filetypes.Meson.conf \
filedefs/filetypes.nim \
filedefs/filetypes.nsis \
Expand Down
62 changes: 62 additions & 0 deletions data/filedefs/filetypes.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For complete documentation of this file, please see Geany's main documentation
[styling]
# Edit these in the colorscheme .conf file instead

default=default
commentline=comment_line
commentblock=comment
string=string_1
stringmultiline=string_1
escapechar=regex
identifier=default
operator=operator
operatorstring=regex
number=number_1
key=tag
path=preprocessor
keyword1=keyword_1
keyword2=keyword_1
keyword3=keyword_2
keyword4=keyword_2

[keywords]
# all items must be in one line
keywords1=assert else if in inherit let or rec then with
keywords2=false null true
keywords3=abort add addDrvOutputDependencies all any attrNames attrValues baseNameOf bitAnd bitOr bitXor break builtins catAttrs ceil compareVersions concatLists concatMap concatStringsSep convertHash currentSystem currentTime deepSeq derivation dirOf div elem elemAt fetchClosure fetchGit fetchTarball fetchTree fetchurl filter filterSource findFile flakeRefToString floor foldl' fromJSON fromTOML functionArgs genList genericClosure getAttr getContext getEnv getFlake groupBy hasAttr hasContext hashFile hashString head import intersectAttrs isAttrs isBool isFloat isFunction isInt isList isNull isPath isString langVersion length lessThan listToAttrs map mapAttrs match mul nixPath nixVersion outputOf parseDrvName parseFlakeRef partition path pathExists placeholder readDir readFile readFileType removeAttrs replaceStrings seq sort split splitVersion storeDir storePath stringLength sub substring tail throw toFile toJSON toPath toString toXML trace traceVerbose tryEval typeOf unsafeDiscardOutputDependency unsafeDiscardStringContext warn zipAttrsWith
keywords4=

[lexer_properties]

[settings]
# default extension used when saving files
extension=nix

# MIME type
mime_type=text/x-nix

# these characters define word boundaries when making selections and searching
# using word matching options
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

# single comment char, 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=0
1 change: 1 addition & 0 deletions data/filetype_extensions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Markdown=*.mdml;*.markdown;*.md;*.mkd;*.mkdn;*.mdwn;*.mdown;*.mdtxt;*.mdtext;
Matlab/Octave=*.m;
Meson=meson.build;meson.options;meson_options.txt;
Nim=*.nim;
Nix=*.nix;
NSIS=*.nsi;*.nsh;
Objective-C=*.m;*.mm;*.h;
Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;*.lpr;
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ lexilla = static_library('lexilla',
'scintilla/lexilla/lexers/LexMarkdown.cxx',
'scintilla/lexilla/lexers/LexMatlab.cxx',
'scintilla/lexilla/lexers/LexNim.cxx',
'scintilla/lexilla/lexers/LexNix.cxx',
'scintilla/lexilla/lexers/LexNsis.cxx',
'scintilla/lexilla/lexers/LexNull.cxx',
'scintilla/lexilla/lexers/LexPascal.cxx',
Expand Down
1 change: 1 addition & 0 deletions scintilla/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ lexilla/lexers/LexMake.cxx \
lexilla/lexers/LexMarkdown.cxx \
lexilla/lexers/LexMatlab.cxx \
lexilla/lexers/LexNim.cxx \
lexilla/lexers/LexNix.cxx \
lexilla/lexers/LexNsis.cxx \
lexilla/lexers/LexNull.cxx \
lexilla/lexers/LexPascal.cxx \
Expand Down
32 changes: 32 additions & 0 deletions scintilla/lexilla/include/SciLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
#define SCLEX_TROFF 137
#define SCLEX_DART 138
#define SCLEX_ZIG 139
#define SCLEX_NIX 140
#define SCLEX_AUTOMATIC 1000
#define SCE_P_DEFAULT 0
#define SCE_P_COMMENTLINE 1
Expand Down Expand Up @@ -202,6 +203,19 @@
#define SCE_C_USERLITERAL 25
#define SCE_C_TASKMARKER 26
#define SCE_C_ESCAPESEQUENCE 27
#define SCE_COBOL_DEFAULT 0
#define SCE_COBOL_COMMENT 1
#define SCE_COBOL_COMMENTLINE 2
#define SCE_COBOL_COMMENTDOC 3
#define SCE_COBOL_NUMBER 4
#define SCE_COBOL_WORD 5
#define SCE_COBOL_STRING 6
#define SCE_COBOL_CHARACTER 7
#define SCE_COBOL_WORD3 8
#define SCE_COBOL_PREPROCESSOR 9
#define SCE_COBOL_OPERATOR 10
#define SCE_COBOL_IDENTIFIER 11
#define SCE_COBOL_WORD2 16
#define SCE_D_DEFAULT 0
#define SCE_D_COMMENT 1
#define SCE_D_COMMENTLINE 2
Expand Down Expand Up @@ -292,6 +306,7 @@
#define SCE_HJ_SYMBOLS 50
#define SCE_HJ_STRINGEOL 51
#define SCE_HJ_REGEX 52
#define SCE_HJ_TEMPLATELITERAL 53
#define SCE_HJA_START 55
#define SCE_HJA_DEFAULT 56
#define SCE_HJA_COMMENT 57
Expand All @@ -305,6 +320,7 @@
#define SCE_HJA_SYMBOLS 65
#define SCE_HJA_STRINGEOL 66
#define SCE_HJA_REGEX 67
#define SCE_HJA_TEMPLATELITERAL 68
#define SCE_HB_START 70
#define SCE_HB_DEFAULT 71
#define SCE_HB_COMMENTLINE 72
Expand Down Expand Up @@ -2150,6 +2166,22 @@
#define SCE_ZIG_KW_TERTIARY 15
#define SCE_ZIG_KW_TYPE 16
#define SCE_ZIG_IDENTIFIER_STRING 17
#define SCE_NIX_DEFAULT 0
#define SCE_NIX_COMMENTLINE 1
#define SCE_NIX_COMMENTBLOCK 2
#define SCE_NIX_STRING 3
#define SCE_NIX_STRING_MULTILINE 4
#define SCE_NIX_ESCAPECHAR 5
#define SCE_NIX_IDENTIFIER 6
#define SCE_NIX_OPERATOR 7
#define SCE_NIX_OPERATOR_STRING 8
#define SCE_NIX_NUMBER 9
#define SCE_NIX_KEY 10
#define SCE_NIX_PATH 11
#define SCE_NIX_KEYWORD1 12
#define SCE_NIX_KEYWORD2 13
#define SCE_NIX_KEYWORD3 14
#define SCE_NIX_KEYWORD4 15
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */

#endif
Loading