Add support for .gitignore highlighting

This commit is contained in:
Adam Stankiewicz
2020-09-24 23:24:42 +02:00
parent a6a6aeab76
commit d53d2189b9
8 changed files with 63 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ A collection of language packs for Vim.
> One to rule them all, one to find them, one to bring them all and in the darkness bind them. > One to rule them all, one to find them, one to bring them all and in the darkness bind them.
- It **won't affect your startup time**, as scripts are loaded only on demand\*. - It **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs and updates 120+ times faster** than the <!--Package Count-->200<!--/Package Count--> packages it consists of. - It **installs and updates 120+ times faster** than the <!--Package Count-->201<!--/Package Count--> packages it consists of.
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect). - It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
- Solid syntax and indentation support (other features skipped). Only the best language packs. - Solid syntax and indentation support (other features skipped). Only the best language packs.
- All unnecessary files are ignored (like enormous documentation from php support). - All unnecessary files are ignored (like enormous documentation from php support).
@@ -115,6 +115,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [fsharp](https://github.com/ionide/Ionide-vim) - [fsharp](https://github.com/ionide/Ionide-vim)
- [gdscript](https://github.com/calviken/vim-gdscript3) - [gdscript](https://github.com/calviken/vim-gdscript3)
- [git](https://github.com/tpope/vim-git) - [git](https://github.com/tpope/vim-git)
- [gitignore](https://github.com/rdolgushin/gitignore.vim)
- [glsl](https://github.com/tikhomirov/vim-glsl) - [glsl](https://github.com/tikhomirov/vim-glsl)
- [gmpl](https://github.com/maelvalais/gmpl.vim) - [gmpl](https://github.com/maelvalais/gmpl.vim)
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) - [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting)

View File

@@ -2,7 +2,7 @@ let s:globs = {
\ '8th': '*.8th', \ '8th': '*.8th',
\ 'Dockerfile': '*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*', \ 'Dockerfile': '*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*',
\ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*', \ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',
\ 'a2ps': 'a2psrc', \ 'a2ps': 'a2psrc,.a2psrc',
\ 'a65': '*.a65', \ 'a65': '*.a65',
\ 'aap': '*.aap', \ 'aap': '*.aap',
\ 'abap': '*.abap', \ 'abap': '*.abap',
@@ -13,15 +13,15 @@ let s:globs = {
\ 'ada': '*.adb,*.ads,*.ada,*.adc,*.gpr,*.ada_m', \ 'ada': '*.adb,*.ads,*.ada,*.adc,*.gpr,*.ada_m',
\ 'ahdl': '*.tdf', \ 'ahdl': '*.tdf',
\ 'aidl': '*.aidl', \ 'aidl': '*.aidl',
\ 'alsaconf': '', \ 'alsaconf': '.asoundrc',
\ 'aml': '*.aml', \ 'aml': '*.aml',
\ 'ampl': '*.run', \ 'ampl': '*.run',
\ 'ant': 'build.xml', \ 'ant': 'build.xml',
\ 'apache': 'access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*', \ 'apache': '.htaccess,access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*',
\ 'apiblueprint': '*.apib', \ 'apiblueprint': '*.apib',
\ 'applescript': '*.applescript,*.scpt', \ 'applescript': '*.applescript,*.scpt',
\ 'aptconf': 'apt.conf', \ 'aptconf': 'apt.conf',
\ 'arch': '=tagging-method', \ 'arch': '.arch-inventory,=tagging-method',
\ 'arduino': '*.pde,*.ino', \ 'arduino': '*.pde,*.ino',
\ 'art': '*.art', \ 'art': '*.art',
\ 'asciidoc': '*.asciidoc,*.adoc,*.asc', \ 'asciidoc': '*.asciidoc,*.adoc,*.asc',
@@ -58,7 +58,7 @@ let s:globs = {
\ 'dd': '*.dd', \ 'dd': '*.dd',
\ 'ddoc': '*.ddoc', \ 'ddoc': '*.ddoc',
\ 'dhall': '*.dhall', \ 'dhall': '*.dhall',
\ 'dosini': '*.wrap,*.ini,*.dof,*.lektorproject,*.prefs,*.pro,*.properties,buildozer.spec,php.ini-*', \ 'dosini': '*.wrap,*.ini,*.dof,*.lektorproject,*.prefs,*.pro,*.properties,buildozer.spec,.editorconfig,.npmrc,php.ini-*',
\ 'dsdl': '*.sdl', \ 'dsdl': '*.sdl',
\ 'dune': 'jbuild,dune,dune-project,dune-workspace', \ 'dune': 'jbuild,dune,dune-project,dune-workspace',
\ 'ecrystal': '*.ecr', \ 'ecrystal': '*.ecr',
@@ -80,9 +80,10 @@ let s:globs = {
\ 'fsharp': '*.fs,*.fsi,*.fsx', \ 'fsharp': '*.fs,*.fsi,*.fsx',
\ 'gdscript3': '*.gd', \ 'gdscript3': '*.gd',
\ 'gitcommit': 'COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG', \ 'gitcommit': 'COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG',
\ 'gitconfig': '*.gitconfig', \ 'gitconfig': '*.gitconfig,.gitconfig,.gitmodules',
\ 'gitignore': '.gitignore',
\ 'gitrebase': 'git-rebase-todo', \ 'gitrebase': 'git-rebase-todo',
\ 'gitsendemail': '', \ 'gitsendemail': '.gitsendemail.*',
\ 'glsl': '*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader,*.comp', \ 'glsl': '*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader,*.comp',
\ 'gmpl': '*.mod', \ 'gmpl': '*.mod',
\ 'gnuplot': '*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,*.gpi', \ 'gnuplot': '*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,*.gpi',
@@ -105,15 +106,15 @@ let s:globs = {
\ 'html.mustache': '*.mustache,*.hogan,*.hulk,*.hjs', \ 'html.mustache': '*.mustache,*.hogan,*.hulk,*.hjs',
\ 'html.twig': '*.twig', \ 'html.twig': '*.twig',
\ 'htmldjango': '*.jinja,*.j2,*.jinja2,*.njk', \ 'htmldjango': '*.jinja,*.j2,*.jinja2,*.njk',
\ 'i3config': '*.i3.config,*.i3config,i3.config,i3config', \ 'i3config': '*.i3.config,*.i3config,i3.config,i3config,.i3.config,.i3config',
\ 'icalendar': '*.ics', \ 'icalendar': '*.ics',
\ 'idris': '*.idr,*.lidr,idris-response', \ 'idris': '*.idr,*.lidr,idris-response',
\ 'idris2': '*.idr,*.ipkg,idris-response', \ 'idris2': '*.idr,*.ipkg,idris-response',
\ 'ion': '*.ion', \ 'ion': '*.ion',
\ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile', \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile',
\ 'javascriptreact': '*.jsx', \ 'javascriptreact': '*.jsx',
\ 'jq': '*.jq', \ 'jq': '*.jq,.jqrc,.jqrc*',
\ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,composer.lock,mcmod.info,Pipfile.lock', \ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.tern-config,.tern-project,.watchmanconfig,composer.lock,mcmod.info,Pipfile.lock',
\ 'json5': '*.json5', \ 'json5': '*.json5',
\ 'jsonnet': '*.jsonnet,*.libsonnet', \ 'jsonnet': '*.jsonnet,*.libsonnet',
\ 'jst': '*.ejs,*.ect,*.jst', \ 'jst': '*.ejs,*.ect,*.jst',
@@ -127,7 +128,7 @@ let s:globs = {
\ 'livescript': '*.ls,*._ls,Slakefile', \ 'livescript': '*.ls,*._ls,Slakefile',
\ 'llvm': '*.ll', \ 'llvm': '*.ll',
\ 'log': '*.log,*.LOG,*_log,*_LOG', \ 'log': '*.log,*.LOG,*_log,*_LOG',
\ 'lua': '*.lua,*.fcgi,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua', \ 'lua': '*.lua,*.fcgi,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,.luacheckrc',
\ 'm4': '*.m4,*.at', \ 'm4': '*.m4,*.at',
\ 'mako': '*.mako,*.mao', \ 'mako': '*.mako,*.mao',
\ 'markdown': '*.md,*.markdown,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr', \ 'markdown': '*.md,*.markdown,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr',
@@ -142,7 +143,7 @@ let s:globs = {
\ 'nix': '*.nix', \ 'nix': '*.nix',
\ 'oasis': '_oasis', \ 'oasis': '_oasis',
\ 'objc': '*.m,*.h', \ 'objc': '*.m,*.h',
\ 'ocaml': '*.ml,*.eliom,*.eliomi,*.ml4,*.mli,*.mll,*.mly,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo', \ 'ocaml': '*.ml,*.eliom,*.eliomi,*.ml4,*.mli,*.mll,*.mly,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo,.ocamlinit',
\ 'ocamlbuild_tags': '_tags', \ 'ocamlbuild_tags': '_tags',
\ 'ocpbuild': '*.ocp', \ 'ocpbuild': '*.ocp',
\ 'ocpbuildroot': '*.root', \ 'ocpbuildroot': '*.root',
@@ -152,7 +153,7 @@ let s:globs = {
\ 'opam': '*.opam,*.opam.template,opam', \ 'opam': '*.opam,*.opam.template,opam',
\ 'opencl': '*.cl,*.opencl', \ 'opencl': '*.cl,*.opencl',
\ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile', \ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile',
\ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,Phakefile', \ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,.php,.php_cs,.php_cs.dist,Phakefile',
\ 'plantuml': '*.puml,*.iuml,*.plantuml,*.uml,*.pu', \ 'plantuml': '*.puml,*.iuml,*.plantuml,*.uml,*.pu',
\ 'pod': '*.pod', \ 'pod': '*.pod',
\ 'pony': '*.pony', \ 'pony': '*.pony',
@@ -163,10 +164,10 @@ let s:globs = {
\ 'pug': '*.jade,*.pug', \ 'pug': '*.jade,*.pug',
\ 'puppet': '*.pp,Modulefile', \ 'puppet': '*.pp,Modulefile',
\ 'purescript': '*.purs', \ 'purescript': '*.purs',
\ 'python': '*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,DEPS,SConscript,SConstruct,Snakefile,wscript', \ 'python': '*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,.gclient,DEPS,SConscript,SConstruct,Snakefile,wscript',
\ 'qmake': '*.pro,*.pri', \ 'qmake': '*.pro,*.pri',
\ 'qml': '*.qml,*.qbs', \ 'qml': '*.qml,*.qbs',
\ 'r': '*.r,*.rsx,*.s,*.S,expr-dist', \ 'r': '*.r,*.rsx,*.s,*.S,.Rprofile,expr-dist',
\ 'racket': '*.rkt,*.rktd,*.rktl,*.scrbl', \ 'racket': '*.rkt,*.rktd,*.rktl,*.scrbl',
\ 'ragel': '*.rl', \ 'ragel': '*.rl',
\ 'raku': '*.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl,*.pl6,*.pm,*.pm6,*.t,*.rakudoc,*.rakutest,*.raku,*.rakumod,*.pod6,*.t6', \ 'raku': '*.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl,*.pl6,*.pm,*.pm6,*.t,*.rakudoc,*.rakutest,*.raku,*.rakumod,*.pod6,*.t6',
@@ -176,13 +177,13 @@ let s:globs = {
\ 'requirements': '*.pip,*requirements.{txt,in},*require.{txt,in},constraints.{txt,in}', \ 'requirements': '*.pip,*requirements.{txt,in},*require.{txt,in},constraints.{txt,in}',
\ 'rhelp': '*.rd', \ 'rhelp': '*.rd',
\ 'rst': '*.rst,*.rest,*.rest.txt,*.rst.txt', \ 'rst': '*.rst,*.rest,*.rest.txt,*.rst.txt',
\ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,Cheffile,KitchenSink,Routefile,vagrantfile,[Rr]akefile*,*_spec.rb', \ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb',
\ 'rust': '*.rs,*.rs.in', \ 'rust': '*.rs,*.rs.in',
\ 'sbt.scala': '*.sbt', \ 'sbt.scala': '*.sbt',
\ 'scala': '*.scala,*.kojo,*.sc', \ 'scala': '*.scala,*.kojo,*.sc',
\ 'scss': '*.scss', \ 'scss': '*.scss',
\ 'sexplib': '*.sexp', \ 'sexplib': '*.sexp',
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile', \ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile',
\ 'slim': '*.slim', \ 'slim': '*.slim',
\ 'slime': '*.slime', \ 'slime': '*.slime',
\ 'smt2': '*.smt2,*.smt', \ 'smt2': '*.smt2,*.smt',
@@ -199,7 +200,7 @@ let s:globs = {
\ 'terraform': '*.hcl,*.nomad,*.tf,*.tfvars,*.workflow', \ 'terraform': '*.hcl,*.nomad,*.tf,*.tfvars,*.workflow',
\ 'textile': '*.textile', \ 'textile': '*.textile',
\ 'thrift': '*.thrift', \ 'thrift': '*.thrift',
\ 'tmux': '', \ 'tmux': '.tmux.conf',
\ 'toml': '*.toml,Cargo.lock,Gopkg.lock,poetry.lock,Pipfile', \ 'toml': '*.toml,Cargo.lock,Gopkg.lock,poetry.lock,Pipfile',
\ 'tptp': '*.p,*.tptp,*.ax', \ 'tptp': '*.p,*.tptp,*.ax',
\ 'trasys': '*.inp', \ 'trasys': '*.inp',
@@ -217,17 +218,17 @@ let s:globs = {
\ 'vmasm': '*.mar', \ 'vmasm': '*.mar',
\ 'vue': '*.vue,*.wpy', \ 'vue': '*.vue,*.wpy',
\ 'xdc': '*.xdc', \ 'xdc': '*.xdc',
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.ps1xml,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config', \ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.ps1xml,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config',
\ 'xml.twig': '*.xml.twig', \ 'xml.twig': '*.xml.twig',
\ 'xs': '*.xs', \ 'xs': '*.xs',
\ 'xsl': '*.xslt,*.xsl', \ 'xsl': '*.xslt,*.xsl',
\ 'yaml': '*.yml,*.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml.mysql,glide.lock,yarn.lock,fish_history,fish_read_history', \ 'yaml': '*.yml,*.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml.mysql,.clang-format,.clang-tidy,.gemrc,glide.lock,yarn.lock,fish_history,fish_read_history',
\ 'yaml.ansible': 'playbook.y{a,}ml,site.y{a,}ml,main.y{a,}ml,local.y{a,}ml,requirements.y{a,}ml,tasks.*.y{a,}ml,roles.*.y{a,}ml,handlers.*.y{a,}ml', \ 'yaml.ansible': 'playbook.y{a,}ml,site.y{a,}ml,main.y{a,}ml,local.y{a,}ml,requirements.y{a,}ml,tasks.*.y{a,}ml,roles.*.y{a,}ml,handlers.*.y{a,}ml',
\ 'yaml.docker-compose': 'docker-compose*.yaml,docker-compose*.yml', \ 'yaml.docker-compose': 'docker-compose*.yaml,docker-compose*.yml',
\ 'zephir': '*.zep', \ 'zephir': '*.zep',
\ 'zig': '*.zig,*.zir', \ 'zig': '*.zig,*.zir',
\ 'zir': '*.zir', \ 'zir': '*.zir',
\ 'zsh': '*.zsh', \ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout',
\} \}
func! sleuth#GlobForFiletype(type) func! sleuth#GlobForFiletype(type)

View File

@@ -2023,6 +2023,10 @@ if !has_key(s:disabled_packages, 'tads')
au! BufNewFile,BufRead *.t call polyglot#DetectTFiletype() au! BufNewFile,BufRead *.t call polyglot#DetectTFiletype()
endif endif
if !has_key(s:disabled_packages, 'gitignore')
au BufNewFile,BufRead {.,}gitignore set ft=gitignore
endif
au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>") !~ g:ft_ignore_pat | au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>") !~ g:ft_ignore_pat |

View File

@@ -1882,3 +1882,10 @@ filetypes:
- name: tads - name: tads
extensions: extensions:
- t - t
---
name: gitignore
remote: rdolgushin/gitignore.vim
filetypes:
- name: gitignore
filenames:
- '.gitignore'

View File

@@ -697,7 +697,7 @@ def generate_plugins(packages)
for package in packages for package in packages
for filetype in package["filetypes"] for filetype in package["filetypes"]
extensions = (filetype["extensions"] || []).map { |e| "*.#{e}" } extensions = (filetype["extensions"] || []).map { |e| "*.#{e}" }
files = (filetype["filenames"] || []).reject { |e| e.match(/\*\*|\//) || e[0] == "." } files = (filetype["filenames"] || []).reject { |e| e.match(/\*\*|\//) }
patterns[filetype["name"]].concat(extensions) patterns[filetype["name"]].concat(extensions)
patterns[filetype["name"]].concat(files) patterns[filetype["name"]].concat(files)
end end

23
syntax/gitignore.vim Normal file
View File

@@ -0,0 +1,23 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1
" Vim syntax file
" Language: .gitignore
" Maintainer: Roman Dolgushin <rd@roman-dolgushin.ru>
" URL: http://github.com/rdolgushin/gitignore.vim
if exists('b:current_syntax')
finish
endif
if !exists('main_syntax')
let main_syntax = 'conf'
endif
runtime! syntax/conf.vim
unlet b:current_syntax
let b:current_syntax = 'gitignore'
setlocal commentstring=#%s
endif

View File

@@ -368,3 +368,6 @@ call TestExtension("htmldjango", "jinja2.html", "{% for item in navigation %}{%
call TestExtension("htmldjango", "jinja3.html", "{% block head %}") call TestExtension("htmldjango", "jinja3.html", "{% block head %}")
call TestExtension("htmldjango", "jinja4.html", "{# some comment #}") call TestExtension("htmldjango", "jinja4.html", "{# some comment #}")
call TestExtension("xhtml", "xhtml.html", "<DTD XHTML ") call TestExtension("xhtml", "xhtml.html", "<DTD XHTML ")
" .gitignore
call TestExtension(".gitignore", ".gitignore", "")

View File

@@ -236,3 +236,4 @@ call TestFiletype('odin')
call TestFiletype('bzl') call TestFiletype('bzl')
call TestFiletype('prolog') call TestFiletype('prolog')
call TestFiletype('tads') call TestFiletype('tads')
call TestFiletype('gitignore')