15 KiB
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 593 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).
- Automatically detect indentation (includes performance-optimized version of vim-sleuth)
- Each build is tested by automated vimrunner script on CI. See
specdirectory.
*To be completely honest, optimized ftdetect script takes around 10ms to load.
Installation
- Install Pathogen, Vundle, NeoBundle, or Plug package manager for Vim.
- 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:
git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/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
On top of all language packs from vim repository, vim-polyglot includes:
- acpiasl
- ansible
- apiblueprint (API Blueprint syntax highlighting)
- applescript (AppleScript syntax highlighting)
- arduino (Processing syntax highlighting)
- asciidoc (AsciiDoc syntax highlighting)
- autohotkey (AutoHotkey syntax highlighting)
- blade (Blade syntax highlighting)
- brewfile
- c/c++ (C++ and C syntax highlighting)
- caddyfile
- carp
- cjsx
- clojure (Clojure syntax highlighting)
- cmake (CMake syntax highlighting)
- coffee-script (CoffeeScript and Literate CoffeeScript syntax highlighting)
- cpp-modern
- cql
- cryptol
- crystal (Crystal and HTML+ECR syntax highlighting)
- csv (CSV syntax highlighting)
- cucumber (Gherkin syntax highlighting)
- cue
- dart (Dart syntax highlighting)
- dhall (Dhall syntax highlighting)
- dlang (D syntax highlighting)
- dockerfile
- elixir (Elixir and HTML+EEX syntax highlighting)
- elm (Elm syntax highlighting)
- emberscript (EmberScript syntax highlighting)
- emblem
- erlang (Erlang syntax highlighting)
- fennel
- ferm
- fish (fish syntax highlighting)
- flatbuffers
- fsharp (F# syntax highlighting)
- gdscript (GDScript syntax highlighting)
- git (Git Config syntax highlighting)
- gitignore
- glsl (GLSL syntax highlighting)
- gmpl
- gnuplot (Gnuplot syntax highlighting)
- go (Go syntax highlighting)
- gradle
- graphql (GraphQL syntax highlighting)
- haml (Haml syntax highlighting)
- handlebars (Mustache and Handlebars syntax highlighting)
- haproxy (HAProxy syntax highlighting)
- haskell (Haskell syntax highlighting)
- haxe (Haxe syntax highlighting)
- hcl (HCL syntax highlighting)
- helm
- help
- hive (HiveQL syntax highlighting)
- html5
- i3
- icalendar
- idris2
- idris (Idris syntax highlighting)
- ion
- javascript-sql
- javascript (JavaScript syntax highlighting)
- jenkins
- jq (JSONiq syntax highlighting)
- json5 (JSON5 syntax highlighting)
- json (JSON syntax highlighting)
- jsonnet (Jsonnet syntax highlighting)
- jst (EJS syntax highlighting)
- jsx (JSX syntax highlighting)
- julia (Julia syntax highlighting)
- kotlin (Kotlin syntax highlighting)
- ledger
- lilypond (LilyPond syntax highlighting)
- livescript (LiveScript syntax highlighting)
- llvm (LLVM syntax highlighting)
- log
- lua (Lua syntax highlighting)
- mako (Mako syntax highlighting)
- markdown (Markdown syntax highlighting)
- mathematica (Mathematica syntax highlighting)
- mdx
- meson (Meson syntax highlighting)
- moonscript (MoonScript syntax highlighting)
- nginx (Nginx syntax highlighting)
- nim (Nim syntax highlighting)
- nix (Nix syntax highlighting)
- objc (Objective-C syntax highlighting)
- ocaml (OCaml syntax highlighting)
- octave
- odin (Odin syntax highlighting)
- opencl (OpenCL syntax highlighting)
- perl (Perl syntax highlighting)
- pgsql (PLpgSQL syntax highlighting)
- php (PHP syntax highlighting)
- plantuml (PlantUML syntax highlighting)
- pony (Pony syntax highlighting)
- powershell (PowerShell syntax highlighting)
- protobuf (Protocol Buffer syntax highlighting)
- pug (Pug syntax highlighting)
- puppet (Puppet syntax highlighting)
- purescript (PureScript syntax highlighting)
- python-compiler
- python-indent
- python (Python syntax highlighting)
- qmake (QMake syntax highlighting)
- qml (QML syntax highlighting)
- r-lang (R syntax highlighting)
- racket (Racket syntax highlighting)
- ragel (Ragel syntax highlighting)
- raku (Raku syntax highlighting)
- raml (RAML syntax highlighting)
- razor (HTML+Razor syntax highlighting)
- reason (Reason syntax highlighting)
- requirements
- rspec
- rst (reStructuredText syntax highlighting)
- ruby (Ruby and HTML+ERB syntax highlighting)
- rust (Rust syntax highlighting)
- scala (Scala syntax highlighting)
- scss (SCSS syntax highlighting)
- sh (Shell syntax highlighting)
- slim (Slim syntax highlighting)
- slime
- smt2 (SMT syntax highlighting)
- solidity (Solidity syntax highlighting)
- stylus (Stylus syntax highlighting)
- svelte (Svelte syntax highlighting)
- svg-indent
- svg (SVG syntax highlighting)
- swift (Swift syntax highlighting)
- sxhkd
- systemd
- textile (Textile syntax highlighting)
- thrift (Thrift syntax highlighting)
- tmux
- toml (TOML syntax highlighting)
- tptp
- twig (Twig syntax highlighting)
- typescript (TypeScript and TSX syntax highlighting)
- unison
- v (V syntax highlighting)
- vala (Vala syntax highlighting)
- vbnet (Visual Basic .NET syntax highlighting)
- vcl (VCL syntax highlighting)
- velocity
- vue (Vue syntax highlighting)
- xdc
- xml (XML syntax highlighting)
- xsl (XSLT syntax highlighting)
- yard
- zephir (Zephir syntax highlighting)
- zig (Zig syntax highlighting)
- zinit
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 = ['markdown']
The list of available languages to disable is shown above.
Please declare this variable before polyglot is loaded (at the top of .vimrc)
If you wish to use filetype detection by Vim Polyglot but you'd like to use your own syntax-highlighting plugin, you can append .plugin to disabled entry, like below. Disabling Vim Polyglot filetype plugin won't disable native Vim filetype plugin.
let g:polyglot_disabled = ['markdown.plugin']
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 lazily loaded only when they are really needed.
Vim Polyglot tries to automatically detect indentation settings (just like vim-sleuth). If this feature is not working for you for some reason, please file an issue and disable it temporarily with:
let g:polyglot_disabled = ['autoindent']
Contributing
Language packs are periodically updated using automated scripts/build script.
Feel free to add your language to packages.yaml + heuristics.yaml, and send pull-request. You can run make test to run rough tests. And make dev for easy development.
License
See linked repositories for detailed license information. This repository is MIT-licensed.
