-- Filename and shebang mapping
--
-- Add an entry for a language syntax which is occupied by multiple source file extensions.
-- If there is only one extension, just name the lang file accordingly and it will work (no entry needed here).
-- The filetype entries in gui_files/ext/fileopenfilter.conf should also be updated for the GUI file dialogs.
--
-- Extensions can be configured for multiple languages (see "asm", which is assigned to assembler and fasm).
-- The command line (CLI) and Qt GUI builds handle ambiguous assignments as follows:
--  - CLI: the first association listed here will be used
--  - GUI: a syntax selection prompt will be shown
--
-- If a filename has no extension by convention (ie. makefile), it may be added here nevertheless or be
-- configured as "Shebang".
--
-- You can assign complete filenames to a syntax with "Filenames", see the "cmake" entry.
-- To define both filenames and extensions, add two separate entries (see "sh" entry).
--
-- A default input encoding can be set with an EncodingHint attribute (requires v. 3.55).
--
-- The first filetypes.conf found in a highlight search directory wins. See README.adoc for search dirs.
--
-- You can override specific settings in ~/.highlight/filetypes.conf like this:
--
-- dofile "/etc/highlight/filetypes.conf"
--
-- table.insert(FileMapping, { Lang="yourlang", Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?yourlang]] })

FileMapping = {

 { Lang="abap", Extensions={"abp"} },
 { Lang="ada",  Extensions={"adb", "ads", "a", "gnad"} },
 { Lang="agda", Extensions={"lagda"} },
 { Lang="alan", Extensions={"alan", "i"} },
 { Lang="algol",  Extensions={"alg"} },
 { Lang="ampl", Extensions={"dat", "run"} },
 { Lang="amtrix", Extensions={"s4", "s4t", "s4h", "hnd", "t4"} },
 { Lang="assembler", Extensions={"asm", "a51", "29k", "68s", "68x", "x86"} },
 { Lang="fasm", Extensions={"asm", "inc"} },
 { Lang="asp", Extensions={"aspx", "ashx", "ascx"} },
 { Lang="ats", Extensions={"dats"} },
 { Lang="aspect", Extensions={"was", "wud"} },
 { Lang="ballerina", Extensions={"bal"} },
 { Lang="bat", Extensions={"cmd"} },
 { Lang="c", Extensions={"c++", "cpp", "cxx", "cc", "h", "hh", "hxx", "hpp", "cu", "inl", "ipp", "ino", "ixx", "cppm"} },
 { Lang="cmake", Filenames={"CMakeLists.txt"} },
 { Lang="charmm", Extensions={"inp"} },
 { Lang="clojure", Extensions={"boot", "cl2", "clj", "cljscm", "cljx", "hic"} },
 { Lang="coldfusion", Extensions={"cfc","cfm"} },
 { Lang="cobol", Extensions={"cob", "cbl"} },
 { Lang="crystal", Extensions={"cr"} },
 { Lang="coffeescript", Extensions={"coffee", "cakefile", "cjsx", "coffee", "iced"} },
 { Lang="conf", Extensions={"anacrontab"} },
 { Lang="delphi", Extensions={"pas", "dpr"} },
 { Lang="diff", Extensions={"patch"} },
 { Lang="dts", Extensions={"dtsi"} },
 { Lang="eiffel", Extensions={"e", "se"} },
 { Lang="elixir", Extensions={"ex", "exs", "heex"} },
 { Lang="erlang", Extensions={"hrl", "erl", "xrl", "yrl"} },
 { Lang="euphoria", Extensions={"ex", "exw", "wxu", "ew", "eu"} },
 { Lang="fortran77", Extensions={"f", "for", "ftn"} },
 { Lang="fortran90", Extensions={"f95", "f90"} },
 { Lang="gambas", Extensions={"class"} },
 { Lang="gdscript", Extensions={"gd"} },
 { Lang="haskell", Extensions={"hs"} },
 { Lang="hugo", Extensions={"hug"} },
 { Lang="ini", Extensions={"doxyfile", "desktop", "kdev3", "reg", "cfg", "inf", "config", ".gitconfig"} },
 { Lang="jam", Extensions={"jam", "ham"} },
 { Lang="java", Extensions={"groovy", "grv", "jenkinsfile", "gradle"} },
 { Lang="javascript", Extensions={"js"} },
 { Lang="julia", Extensions={"jl"} },
 { Lang="kotlin", Extensions={"kt", "kts"} },
 { Lang="limbo", Extensions={"b"} },
 { Lang="lisp", Extensions={"cl", "clisp", "el", "lsp", "sbcl", "scom", "fas", "scm", "mud", "fasl" } },
 { Lang="makefile", Extensions={"mak", "mk", "gnumakefile"} },
 { Lang="meson", Filenames={ "meson.build", "meson_options.txt" } },
 { Lang="snmp", Extensions={"mib", "smi"} },
 { Lang="ocaml", Extensions={"ml","mli", "eliom", "eliomi", "ml4", "mll", "mly"} },
 { Lang="mod2", Extensions={"mod", "def"} },
 { Lang="mod3", Extensions={"m3", "i3"} },
 { Lang="oberon", Extensions={"ooc"} },
 { Lang="php", Extensions={"php3", "php4", "php5", "php6", "php7", "phps", "phpt"} },
 { Lang="pike", Extensions={"pmod"} },
 { Lang="pl1", Extensions={"ff", "fp", "fpp", "rpp","sf", "sp", "spb",
               "spp","sps", "wp", "wf", "wpp","wps","wpb","bdy","spe"} },
 { Lang="perl", Extensions={"pl","perl", "cgi", "pm", "plx", "plex"} },
 { Lang="polygen",  Extensions={"grm"} },
 { Lang="pro", Extensions={"pro"} },
 { Lang="qmake", Extensions={"pro"} },
 { Lang="progress", Extensions={"p", "i", "w"} },
 { Lang="purescript", Extensions={"purs"} },
 { Lang="ruby", Extensions={"rb","ruby", "pp", "rjs", "gemfile", "rakefile", "appfile", "appraisals", "berksfile",
                 "brewfile", "capfile", "cgi", "cheffile", "config.ru", "deliverfile", "fastfile", "fcgi", "gemspec",
                 "guardfile", "irbrc", "jbuilder", "podfile", "podspec", "prawn", "rabl", "rake", "rantfile", "rbx",
                 "scanfile", "simplecov", "snapfile", "thor", "thorfile", "vagrantfile" } },
 { Lang="rexx", Extensions={"rex", "rx", "the"} },
 { Lang="shellscript", Filenames={".zshrc", ".bashrc"} },
 { Lang="shellscript", Extensions={"sh", "bash", "zsh", "ebuild", "eclass"} },
 { Lang="smalltalk", Extensions={"st", "gst", "sq"} },
 { Lang="sybase", Extensions={"sp"} },
 { Lang="tcl", Extensions={"wish", "itcl"} },
 { Lang="tcsh", Extensions={"csh", "tcsh", ".cshrc", ".tcshrc"} },
 { Lang="terraform", Extensions={"tf", "tfvars"} },
 { Lang="tex", Extensions={"sty", "cls"} },
 { Lang="vb", Extensions={"bas", "basic", "bi", "vbs"} },
 { Lang="verilog", Extensions={"v"} },
 { Lang="html", Extensions={"htm", "xhtml", "twig", "jinja"} },
 { Lang="xml", Extensions={"sgm", "sgml", "nrm", "ent","hdr", "hub", "dtd", "glade",
               "wml","vxml", "wml", "tld", "csproj","xsl", "ecf", "jnlp", "xsd",
               "resx", "rng", "rss", "opml", "graphml"} },
 { Lang="fsharp", Extensions={"fs","fsi","fsx"} },
 { Lang="informix", Extensions={"4gl"} },
 { Lang="blitzbasic", Extensions={"bb"} },
 { Lang="innosetup", Extensions={"iss"} },
 { Lang="lotus", Extensions={"ls"} },
 { Lang="ascend", Extensions={"a4c"} },
 { Lang="actionscript", Extensions={"as"} },
 { Lang="express", Extensions={"exp"} },
 { Lang="hare", Extensions={"ha"} },
 { Lang="haxe", Extensions={"hx"} },
 { Lang="pyrex", Extensions={"pyx"} },

 { Lang="abap4", Extensions={"abp"} },
 { Lang="csharp", Extensions={"cs"} },
 { Lang="interlis", Extensions={"ili"} },
 { Lang="logtalk", Extensions={"lgt"} },
 { Lang="matlab", Extensions={"m"} },
 { Lang="nsis", Extensions={"nsi", "nsh"} },
 { Lang="bison", Extensions={"y"} },
 { Lang="squirrel", Extensions={"nut"} },
 { Lang="luban", Extensions={"lbn"} },
 { Lang="maya", Extensions={"mel"} },
 { Lang="nemerle", Extensions={"n"} },
 { Lang="nim", Extensions={"nimble", "nimrod", "nims"} },
 { Lang="paradox", Extensions={"sc"} },
 { Lang="netrexx", Extensions={"nrx"} },
 { Lang="clearbasic", Extensions={"cb"} },
 { Lang="graphviz", Extensions={"dot"} },
 { Lang="small", Extensions={"sma"} },
 { Lang="autoit", Extensions={"au3"} },
 { Lang="chill", Extensions={"chl"} },
 { Lang="autohotkey", Extensions={"ahk"} },
 { Lang="fame", Extensions={"fame"} },
 { Lang="modelica", Extensions={"mo"} },
 { Lang="maple", Extensions={"mpl"} },
 { Lang="jasmin", Extensions={"j"} },
 { Lang="snobol", Extensions={"sno"} },
 { Lang="icon", Extensions={"icn"} },
 { Lang="felix", Extensions={"flx"} },
 { Lang="lindenscript", Extensions={"lsl"} },
 { Lang="lilypond", Extensions={"ly"} },
 { Lang="nasal", Extensions={"nas"} },
 { Lang="clean", Extensions={"icl"} },
 { Lang="bibtex", Extensions={"bib"} },
 { Lang="python", Extensions={"py", "py3",  "pyw", "pyi", "pyx", "pxd", "pxi", "rpy", "cpy",
                              "sconstruct", "gyp", "gypi", "snakefile", "wscript" } },
 { Lang="python", Filenames={"SConstruct"} },
 { Lang="rust", Extensions={"rs"} },

 { Lang="txt", Extensions={"text"} },
 { Lang="n3", Extensions={"ttl", "nt"} },
 { Lang="biferno", Extensions={"bfr"} },
 { Lang="scilab", Extensions={"sci", "sce"} },
 { Lang="msl", Extensions={"nbs"} },
 { Lang="yaml", Extensions={"yml"} },
 { Lang="vimscript", Extensions={"vim", "vimrc", "gvimrc"} },
 { Lang="purebasic",  Extensions={"pb", "pbi", "pbf"} },
 { Lang="markdown",  Extensions={"md", "markdown", "mdwn", "mdx", "mkd", "mkdn", "mkdown", "ronn", "workbook"} },
 { Lang="clojure",  Extensions={"clj", "cljc", "cljs", "edn"} },
 { Lang="solidity",  Extensions={"sol"} },
 { Lang="powershell", Extensions={"ps1", "psm1", "psd1"} },
 { Lang="typescript",  Extensions={"ts"} },

 { Lang="exapunks", Extensions={"exapunks", "exa"} },
 { Lang="exapunks", Shebang=[[^(?i:NOTE\sEXAPUNKS)\b]] },

 { Lang="xml", Shebang=[[^\s*<\?xml\s+version=\"1\.0\"\s+[^(>)]*?>\s*$]] },
 { Lang="shellscript",  Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?([bd]ash|t?csh|[akz]?sh)]] },
 { Lang="makefile",Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?make]] },
 { Lang="awk", Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?[gnm]?awk]] },
 { Lang="perl",  Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?perl]] },
 { Lang="python",  Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?python]] },
 { Lang="ruby",  Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?ruby]] },
 { Lang="php", Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?php]] },
 { Lang="javascript", Shebang=[[^#!\s*(/usr)?(/local)?/bin/(env\s+)?node]] }
}
