mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de3110b733 | ||
|
|
7cbd509b6c | ||
|
|
f025e2778a |
@@ -8,7 +8,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.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 70+ times faster** than 70+ packages it consist of.
|
||||
- It **installs 70+ times faster** than 70+ packages it consist of.
|
||||
- Solid syntax and indentation support. 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`).
|
||||
@@ -33,13 +33,12 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
- [cjsx](https://github.com/mtscout6/vim-cjsx) (ftdetect, syntax, ftplugin)
|
||||
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin, ftdetect)
|
||||
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
|
||||
- [cql](https://github.com/elubow/cql-vim) (syntax, ftdetect)
|
||||
- [css](https://github.com/JulesWang/css.vim) (syntax)
|
||||
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||
- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, autoload, ftplugin, ftdetect)
|
||||
- [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, ftdetect)
|
||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||
- [elm](https://github.com/lambdatoast/elm.vim) (syntax, indent, autoload, ftplugin, ftdetect)
|
||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||
- [emberscript](https://github.com/heartsentwined/vim-ember-script) (syntax, indent, ftplugin, ftdetect)
|
||||
- [emblem](https://github.com/heartsentwined/vim-emblem) (syntax, indent, ftplugin, ftdetect)
|
||||
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent, ftdetect)
|
||||
@@ -78,8 +77,8 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, ftplugin, ftdetect)
|
||||
- [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)
|
||||
- [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin, ftdetect)
|
||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
|
||||
- [ragel](https://github.com/jneen/ragel.vim) (syntax)
|
||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
|
||||
- [rspec](https://github.com/sheerun/rspec.vim) (syntax, ftdetect)
|
||||
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
|
||||
- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
|
||||
@@ -102,7 +101,6 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax, ftdetect)
|
||||
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent, ftdetect)
|
||||
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
||||
- [yaml](https://github.com/stephpy/vim-yaml) (syntax, ftplugin)
|
||||
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
||||
|
||||
## Disabling a language pack
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Yaml
|
||||
" Author: Henrique Barcelos
|
||||
" Date: 2014-10-08
|
||||
" URL: https://github.com/hjpbarcelos
|
||||
setlocal autoindent sw=2 ts=2 expandtab
|
||||
" vim:set sw=2:
|
||||
|
||||
endif
|
||||
@@ -1,64 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1
|
||||
|
||||
" To make this file do stuff, add something like the following (without the
|
||||
" leading ") to your ~/.vimrc:
|
||||
" au BufNewFile,BufRead *.yaml,*.yml so ~/src/PyYaml/YAML.vim
|
||||
|
||||
" Vim syntax/macro file
|
||||
" Language: YAML
|
||||
" Author: Igor Vergeichik <iverg@mail.ru>
|
||||
" Sponsor: Tom Sawyer <transami@transami.net>
|
||||
" Stayven: Ryan King <jking@panoptic.com>
|
||||
" Copyright (c) 2002 Tom Saywer
|
||||
|
||||
" Add an item to a gangly list:
|
||||
"map , o<bs><bs><bs><bs>-<esc>o
|
||||
" Convert to Canonical form:
|
||||
"map \c :%!python -c 'from yaml.redump import redump; import sys; print redump(sys.stdin.read()).rstrip()'
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
endif
|
||||
syntax clear
|
||||
|
||||
syn match yamlDelimiter "[:,-]"
|
||||
syn match yamlBlock "[\[\]\{\}\|\>]"
|
||||
syn match yamlOperator "[?^+-]\|=>"
|
||||
|
||||
syn region yamlComment start="\#" end="$"
|
||||
syn match yamlIndicator "#YAML:\S\+"
|
||||
|
||||
syn region yamlString start="'" end="'" skip="\\'"
|
||||
syn region yamlString start='"' end='"' skip='\\"' contains=yamlEscape
|
||||
syn match yamlEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match yamlEscape "\\\o\o\=\o\=" contained
|
||||
syn match yamlEscape "\\x\x\+" contained
|
||||
|
||||
syn match yamlType "!\S\+"
|
||||
|
||||
syn keyword yamlConstant NULL Null null NONE None none NIL Nil nil
|
||||
syn keyword yamlConstant TRUE True true YES Yes yes ON On on
|
||||
syn keyword yamlConstant FALSE False false NO No no OFF Off off
|
||||
|
||||
syn match yamlKey "\w\+\ze\s*:"
|
||||
syn match yamlAnchor "&\S\+"
|
||||
syn match yamlAlias "*\S\+"
|
||||
|
||||
" Setupt the hilighting links
|
||||
|
||||
hi link yamlConstant Keyword
|
||||
hi link yamlIndicator PreCondit
|
||||
hi link yamlAnchor Function
|
||||
hi link yamlAlias Function
|
||||
hi link yamlKey Identifier
|
||||
hi link yamlType Type
|
||||
|
||||
hi link yamlComment Comment
|
||||
hi link yamlBlock Operator
|
||||
hi link yamlOperator Operator
|
||||
hi link yamlDelimiter Delimiter
|
||||
hi link yamlString String
|
||||
hi link yamlEscape Special
|
||||
|
||||
|
||||
endif
|
||||
6
build
6
build
@@ -104,13 +104,12 @@ PACKS="
|
||||
cjsx:mtscout6/vim-cjsx
|
||||
clojure:guns/vim-clojure-static
|
||||
coffee-script:kchmck/vim-coffee-script
|
||||
cql:elubow/cql-vim
|
||||
css:JulesWang/css.vim
|
||||
cucumber:tpope/vim-cucumber
|
||||
dart:dart-lang/dart-vim-plugin
|
||||
dockerfile:honza/dockerfile.vim
|
||||
elixir:elixir-lang/vim-elixir
|
||||
elm:lambdatoast/elm.vim
|
||||
elixir:elixir-lang/vim-elixir
|
||||
emberscript:heartsentwined/vim-ember-script
|
||||
emblem:heartsentwined/vim-emblem
|
||||
erlang:vim-erlang/vim-erlang-runtime
|
||||
@@ -149,8 +148,8 @@ PACKS="
|
||||
puppet:rodjek/vim-puppet
|
||||
python:mitsuhiko/vim-python-combined
|
||||
qml:peterhoeg/vim-qml
|
||||
r-lang:vim-scripts/R.vim
|
||||
ragel:jneen/ragel.vim
|
||||
r-lang:vim-scripts/R.vim
|
||||
rspec:sheerun/rspec.vim
|
||||
ruby:vim-ruby/vim-ruby
|
||||
rust:rust-lang/rust.vim
|
||||
@@ -173,7 +172,6 @@ PACKS="
|
||||
vcl:smerrill/vcl-vim-plugin
|
||||
vm:lepture/vim-velocity
|
||||
xls:vim-scripts/XSLT-syntax
|
||||
yaml:stephpy/vim-yaml
|
||||
yard:sheerun/vim-yardoc
|
||||
"
|
||||
|
||||
|
||||
@@ -45,12 +45,6 @@ function! s:DetectCoffee()
|
||||
endfunction
|
||||
autocmd BufNewFile,BufRead * call s:DetectCoffee()
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1
|
||||
|
||||
if has("autocmd")
|
||||
au BufNewFile,BufRead *.cql set filetype=cql
|
||||
endif
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1
|
||||
|
||||
autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber
|
||||
|
||||
134
syntax/cql.vim
134
syntax/cql.vim
@@ -1,134 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: cql
|
||||
" Maintainer: Eric Lubow <eric@lubow.org
|
||||
" Filenames: *.cql
|
||||
" URL: https://github.com/elubow/cql-vim
|
||||
" Note:
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Always ignore case
|
||||
syn case ignore
|
||||
|
||||
" General keywords which don't fall into other categories
|
||||
syn keyword cqlKeyword apply and batch
|
||||
syn keyword cqlKeyword column columnfamily create delete drop
|
||||
syn keyword cqlKeyword family first from
|
||||
syn keyword cqlKeyword in index insert into
|
||||
syn keyword cqlKeyword limit key keyspace
|
||||
syn keyword cqlKeyword on or primary reversed
|
||||
syn keyword cqlKeyword select set truncate
|
||||
syn keyword cqlKeyword where with update use using values
|
||||
|
||||
" CQL 3 additions
|
||||
syn keyword cqlKeyword table order by type if exists not frozen
|
||||
|
||||
|
||||
" Column family/table options
|
||||
syn keyword cqlKeyword comparator key_cache_size row_cache_size read_repair_chance
|
||||
syn keyword cqlKeyword gc_grace_seconds default_validation min_compaction_threshold
|
||||
syn keyword cqlKeyword max_compaction_threshold row_cache_save_period_in_seconds
|
||||
syn keyword cqlKeyword key_cache_save_period_in_seconds memtable_flush_after_mins
|
||||
syn keyword cqlKeyword memtable_throughput_in_mb memtable_operations_in_millions replication_on_write
|
||||
syn keyword cqlKeyword replication_on_write default_validation_class key_validation_class
|
||||
syn keyword cqlKeyword rows_cached row_cache_save_period row_cache_keys_to_save keys_cached
|
||||
syn keyword cqlKeyword column_type key_cache_save_period gc_grace replicate_on_write
|
||||
syn keyword cqlKeyword row_cache_provider compaction_strategy column_metadata
|
||||
syn keyword cqlKeyword column_name validation_class subcomparator replication
|
||||
syn keyword cqlKeyword index_name index_type caching dclocal_read_repair_chance
|
||||
syn keyword cqlKeyword bloom_filter_fp_chance populate_io_cache_on_flush compaction
|
||||
syn keyword cqlKeyword compression class sstable_compression
|
||||
|
||||
" CQL 3 additions
|
||||
syn keyword cqlKeyword clustering
|
||||
|
||||
" Keyspace options
|
||||
syn keyword cqlKeyword placement_strategy strategy_options durable_writes replication_factor
|
||||
syn keyword cqlKeyword strategy_class
|
||||
|
||||
" Hadoop keywords
|
||||
syn keyword cqlKeyword currentJobTracker
|
||||
|
||||
|
||||
" TODO Fix to use regions properly
|
||||
syn keyword cqlColType standard super
|
||||
syn region cqlColumnType start="column_type\W" end="\"'" contains=cqlColType
|
||||
|
||||
" TODO Fix to use regions properly
|
||||
syn keyword cqlPStrategy simplestrategy localstrategy networktopologystrategy
|
||||
syn region cqlPlacementStrategy start="placement_strategy\W" end="\"'" contains=cqlPlaceStrategy
|
||||
|
||||
" Comments highlight the word as a keyword and comment as blue
|
||||
syn region cqlKeyword start=/comment\s*=\s*'/ end=/'/ contains=cqlComment
|
||||
syn region cqlKeyword start=/comment\s*=\s*"/ end=/"/ contains=cqlComment
|
||||
syn region cqlComment start="/\*" end="\*/" contains=cqlComment
|
||||
syn match cqlComment /'\zs\%(\\.\|[^\\']\)*\ze'/ contained
|
||||
syn match cqlComment /"\zs\%(\\.\|[^\\"]\)*\ze"/ contained
|
||||
syn match cqlComment "--.*$" contains=cqlComment
|
||||
syn match cqlComment "//.*$" contains=cqlComment
|
||||
syn match cqlComment "/\*\*/"
|
||||
|
||||
" Special values
|
||||
syn keyword cqlSpecial false null true
|
||||
|
||||
" TODO Add ability to include entire Java class name for compaction strategies
|
||||
syn keyword cqlType SizeTieredCompactionStrategy LeveledCompactionStrategy
|
||||
|
||||
" Variable Types
|
||||
syn keyword cqlType bytea ascii text varchar uuid varint int bigint
|
||||
syn keyword cqlType bytestype utf8type timeuuidtype timeuuid timestamp
|
||||
syn keyword cqlType blob boolean counter decimal double float
|
||||
syn keyword cqlType serializingcacheprovider
|
||||
syn keyword cqlType set list map tuple
|
||||
|
||||
" Consistency Levels
|
||||
syn region cqlType start="consistency" end="zero"
|
||||
syn region cqlType start="consistency" end="one"
|
||||
syn region cqlType start="consistency" end="quorum"
|
||||
syn region cqlType start="consistency" end="all"
|
||||
syn region cqlType start="consistency" end="local_quorum"
|
||||
syn region cqlType start="consistency" end="each_quorum"
|
||||
|
||||
" Numbers and hexidecimal values
|
||||
syn match cqlNumber "-\=\<[0-9]*\>"
|
||||
syn match cqlNumber "-\=\<[0-9]*\.[0-9]*\>"
|
||||
syn match cqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>"
|
||||
syn match cqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>"
|
||||
syn match cqlNumber "\<0x[abcdefABCDEF0-9]*\>"
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_cql_syn_inits")
|
||||
if version < 508
|
||||
let did_cql_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink cqlKeyword Statement
|
||||
HiLink cqlSpecial Special
|
||||
HiLink cqlString String
|
||||
HiLink cqlNumber Number
|
||||
HiLink cqlVariable Identifier
|
||||
HiLink cqlComment Comment
|
||||
HiLink cqlType Type
|
||||
HiLink cqlOperator Statement
|
||||
HiLink cqlConsistency Statement
|
||||
HiLink cqlColType Type
|
||||
HiLink cqlPStrategy Type
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "cql"
|
||||
|
||||
|
||||
endif
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1
|
||||
" Vim syntax file
|
||||
" Language: Kotlin
|
||||
" Maintainer: Alexander Udalov
|
||||
" Latest Revision: 23 December 2015
|
||||
" Latest Revision: 7 December 2015
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -23,8 +23,7 @@ syn keyword ktInclude import package
|
||||
syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit
|
||||
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic
|
||||
syn keyword ktStructure class object interface fun val var constructor init
|
||||
|
||||
syn keyword ktReservedKeyword async typealias typeof yield
|
||||
syn keyword ktTypedef typealias
|
||||
|
||||
syn keyword ktBoolean true false
|
||||
syn keyword ktConstant null
|
||||
@@ -68,7 +67,6 @@ hi link ktRepeat Repeat
|
||||
hi link ktOperator Operator
|
||||
hi link ktKeyword Keyword
|
||||
hi link ktException Exception
|
||||
hi link ktReservedKeyword Error
|
||||
|
||||
hi link ktInclude Include
|
||||
|
||||
|
||||
@@ -87,14 +87,14 @@ exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start=
|
||||
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```*.*$" end="^\s*```*\ze\s*$" keepend
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend
|
||||
|
||||
syn match markdownFootnote "\[^[^\]]\+\]"
|
||||
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
|
||||
|
||||
if main_syntax ==# 'markdown'
|
||||
for s:type in g:markdown_fenced_languages
|
||||
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```*\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||
endfor
|
||||
unlet! s:type
|
||||
endif
|
||||
|
||||
@@ -179,7 +179,7 @@ hi link scalaTypeOperator Keyword
|
||||
hi link scalaTypeAnnotationParameter Function
|
||||
|
||||
syn match scalaShebang "\%^#!.*" display
|
||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@scalaHtml,@Spell keepend fold
|
||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@scalaHtml,@Spell keepend
|
||||
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
||||
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
|
||||
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained
|
||||
|
||||
Reference in New Issue
Block a user