/vim-polyglot

A solid language pack for Vim.

Primary LanguageVim Script

vim-polyglot

build Maintenance

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.

  • It won't affect your startup time, as scripts are loaded only on demand*.
  • It installs and updates 120+ times faster than the 155 packages it consists of.
  • 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.
  • All unnecessary files are ignored (like enormous documentation from php support).
  • No support for esoteric languages, only most popular ones (modern too, like slim).
  • Each build is tested by automated vimrunner script on CI. See spec directory.

*To be completely honest, optimized ftdetect script takes around 19ms to load.

Installation

  1. Install Pathogen, Vundle, NeoBundle, or Plug package manager for Vim.
  2. Use this repository as submodule or package.

For example when using Plug:

Plug 'sheerun/vim-polyglot'

Optionally download one of the releases and unpack it directly under ~/.vim directory.

You can also use Vim 8 built-in package manager:

mkdir -p ~/.vim/pack/default/start
git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot

NOTE: Not all features of individual language packs are available. We strip them from functionality slowing vim startup (for example we ignore plugins folder that is loaded regardless of file type, instead we prefer ftplugin which is loaded lazily).

If you need full functionality of any plugin, please use it directly with your plugin manager.

Language packs

  • acpiasl (syntax)
  • ansible (syntax, indent, ftplugin)
  • apiblueprint (syntax, ctags)
  • applescript (syntax, indent)
  • arduino (syntax, indent)
  • asciidoc (syntax)
  • autohotkey (indent)
  • blade (syntax, indent, ftplugin)
  • brewfile (syntax)
  • c++11 (syntax)
  • c/c++ (syntax)
  • caddyfile (syntax, indent, ftplugin)
  • carp (syntax)
  • cjsx (syntax, ftplugin)
  • clojure (syntax, indent, doc, autoload, ftplugin)
  • cmake (syntax, indent)
  • coffee-script (syntax, indent, doc, compiler, autoload, ftplugin)
  • cql (syntax)
  • cryptol (syntax, doc, compiler, ftplugin)
  • crystal (syntax, indent, autoload, ftplugin)
  • csv (syntax, doc, autoload, ftplugin)
  • cucumber (syntax, indent, compiler, ftplugin)
  • cue (syntax)
  • dart (syntax, indent, doc, autoload, ftplugin)
  • dhall (syntax, doc, ftplugin)
  • dlang (syntax, indent)
  • dockerfile (syntax, indent, ftplugin)
  • elixir (syntax, indent, doc, compiler, autoload, ftplugin)
  • elm (syntax, indent)
  • emberscript (syntax, indent, ftplugin)
  • emblem (syntax, indent, ftplugin)
  • erlang (syntax, indent)
  • fennel (syntax, indent, ftplugin)
  • ferm (syntax)
  • fish (syntax, indent, compiler, autoload, ftplugin)
  • flatbuffers (syntax)
  • fsharp (syntax, indent, doc, autoload)
  • gdscript (syntax, indent)
  • git (syntax, indent, doc, ftplugin)
  • glsl (syntax, indent)
  • gmpl (syntax)
  • gnuplot (syntax)
  • go (syntax, indent, doc, compiler)
  • gradle (compiler)
  • graphql (syntax, indent, autoload, ftplugin, after, doc)
  • haml (syntax, indent, compiler, ftplugin)
  • handlebars (syntax, indent, ftplugin)
  • haproxy (syntax)
  • haskell (syntax, indent, doc, ftplugin)
  • haxe (syntax)
  • hcl (syntax, indent, ftplugin)
  • helm (syntax)
  • hive (syntax, ftplugin)
  • html5 (syntax, indent, autoload, ftplugin)
  • i3 (syntax, ftplugin)
  • icalendar (syntax)
  • idris (syntax, indent, doc, ftplugin)
  • ion (syntax, ftplugin)
  • javascript (syntax, indent, ftplugin, extras)
  • jenkins (syntax, indent)
  • jinja (syntax, indent)
  • jq (syntax, ftplugin)
  • json5 (syntax)
  • json (syntax, indent, ftplugin)
  • jsonnet (syntax, doc, autoload, ftplugin)
  • jst (syntax, indent)
  • jsx (autoload, after, doc)
  • julia (syntax, indent, doc, autoload, ftplugin)
  • kotlin (syntax, indent, ftplugin)
  • ledger (syntax, indent, doc, compiler, autoload)
  • less (syntax, indent, ftplugin)
  • lilypond (syntax, indent, compiler, ftplugin)
  • livescript (syntax, indent, compiler, ftplugin)
  • llvm (syntax, indent, ftplugin)
  • log (syntax, doc)
  • lua (syntax, indent)
  • mako (syntax, indent, ftplugin)
  • markdown (syntax, indent, doc, ftplugin)
  • mathematica (syntax, ftplugin)
  • mdx (syntax)
  • meson (syntax, indent, ftplugin)
  • moonscript (syntax, indent, ftplugin)
  • nginx (syntax, indent, ftplugin)
  • nim (syntax, indent, compiler, autoload)
  • nix (syntax, indent, compiler, ftplugin)
  • objc (ftplugin, syntax, indent)
  • ocaml (syntax, indent, doc, compiler, ftplugin)
  • octave (syntax, indent)
  • opencl (syntax, indent, ftplugin)
  • perl (syntax, indent, ftplugin)
  • pgsql (syntax, indent, doc)
  • php (syntax)
  • plantuml (syntax, indent, ftplugin)
  • pony (syntax, indent, autoload, ftplugin)
  • powershell (syntax, indent, doc, compiler, ftplugin)
  • protobuf (syntax, indent)
  • pug (syntax, indent, ftplugin)
  • puppet (syntax, indent, autoload, ftplugin, ctags)
  • purescript (syntax, indent, ftplugin)
  • python-compiler (compiler, autoload)
  • python-indent (indent)
  • python (syntax, doc)
  • qmake (syntax)
  • qml (syntax, indent, ftplugin)
  • r-lang (syntax)
  • racket (syntax, indent, ftplugin)
  • ragel (syntax)
  • raku (syntax, indent, ftplugin)
  • raml (syntax, doc, ftplugin)
  • razor (syntax, indent, ftplugin)
  • reason (syntax, indent, doc)
  • requirements (syntax, autoload)
  • rspec (syntax)
  • rst (syntax, indent, autoload, ftplugin)
  • ruby (syntax, indent, doc, compiler, autoload, ftplugin)
  • rust (syntax, indent, doc, compiler, autoload, ftplugin, ctags)
  • sbt (syntax)
  • scala (syntax, indent, doc, compiler, ftplugin, ctags)
  • scss (syntax, indent, ftplugin)
  • sh (syntax)
  • slim (syntax, indent, ftplugin)
  • slime (syntax, indent)
  • smt2 (syntax, autoload, ftplugin)
  • solidity (syntax, indent, ftplugin)
  • sql (syntax)
  • stylus (syntax, indent, ftplugin)
  • svelte (syntax, indent, ftplugin)
  • svg-indent (indent)
  • svg (syntax)
  • swift (syntax, indent, compiler, ftplugin, ctags)
  • sxhkd (syntax)
  • systemd (syntax, ftplugin)
  • terraform (syntax, indent, doc, autoload, ftplugin)
  • textile (syntax, doc, ftplugin)
  • thrift (syntax)
  • tmux (syntax, ftplugin)
  • toml (syntax, ftplugin)
  • tptp (syntax)
  • twig (syntax, indent, ftplugin)
  • typescript (syntax, indent, compiler, ftplugin, ctags)
  • unison (syntax)
  • v (syntax, indent, ftplugin)
  • vala (syntax, indent, ftplugin)
  • vbnet (syntax)
  • vcl (syntax)
  • velocity (syntax, indent)
  • vue (syntax, indent, ftplugin)
  • xdc (syntax)
  • xml (syntax)
  • xsl (syntax)
  • yaml (syntax, ftplugin)
  • yard (syntax)
  • zephir (syntax)
  • zig (syntax, indent, autoload, ftplugin)
  • zinit (syntax)

Updating

You can either wait for new patch release with updates or run make by yourself.

Troubleshooting

Please make sure you have syntax on in your .vimrc (or use something like sheerun/vimrc)

Individual language packs can be disabled by setting g:polyglot_disabled as follows:

let g:polyglot_disabled = ['css']

Please declare this variable before polyglot is loaded (at the top of .vimrc)

Please note that disabling a language won't make in your vim startup any faster / slower (only for specific this specific filetype). All plugins are loaded lazily, on demand.

Contributing

Language packs are periodically updated using automated scripts/build script.

Feel free to add your language to packages.yaml, and send pull-request. Please don't run make and include that in your PR, send just changes to packages.yaml and build scripts if really necessary. You can run make test to run rough tests.

License

See linked repositories for detailed license information. This repository is MIT-licensed.