Skip to content

Commit fd74d8b

Browse files
committed
Update
1 parent 055f771 commit fd74d8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2557
-1895
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ If you need full functionality of any plugin, please use it directly with your p
105105
- [mathematica](https://github.com/rsmenon/vim-mathematica) (syntax, ftplugin)
106106
- [nginx](https://github.com/chr4/nginx.vim) (syntax, indent, ftplugin)
107107
- [nim](https://github.com/zah/nim.vim) (syntax, compiler, indent)
108-
- [nix](https://github.com/LnL7/vim-nix) (syntax, indent, ftplugin)
108+
- [nix](https://github.com/LnL7/vim-nix) (syntax, indent, compiler, ftplugin)
109109
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)
110110
- [ocaml](https://github.com/jrk/vim-ocaml) (syntax, indent, ftplugin)
111111
- [octave](https://github.com/vim-scripts/octave.vim--) (syntax)

after/ftplugin/jsx.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1
1111
" modified from html.vim
1212
if exists("loaded_matchit")
1313
let b:match_ignorecase = 0
14-
let b:match_words = '(:),\[:\],{:},<:>,' .
14+
let s:jsx_match_words = '(:),\[:\],{:},<:>,' .
1515
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(/\@<!>\|$\):<\@<=/\1>'
16+
let b:match_words = exists('b:match_words')
17+
\ ? b:match_words . ',' . s:jsx_match_words
18+
\ : s:jsx_match_words
1619
endif
1720

1821
setlocal suffixesadd+=.jsx

after/ftplugin/terraform.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,11 @@ if get(g:, "terraform_align", 1)
7575
setlocal shiftwidth=2
7676
endif
7777

78+
" Set the commentstring
79+
if exists('g:terraform_commentstring')
80+
let &l:commentstring=g:terraform_commentstring
81+
else
82+
setlocal commentstring=#%s
83+
endif
84+
7885
endif

after/syntax/jsx.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ endif
3636
" jsBlock take care of ending the region.
3737
syn region xmlString contained start=+{+ end=++ contains=jsBlock,javascriptBlock
3838

39+
" JSX comments inside XML tag should color as comment. Note the trivial end pattern; we let
40+
" jsComment take care of ending the region.
41+
syn region xmlString contained start=+//+ end=++ contains=jsComment
42+
3943
" JSX child blocks behave just like JSX attributes, except that (a) they are
4044
" syntactically distinct, and (b) they need the syn-extend argument, or else
4145
" nested XML end-tag patterns may end the outer jsxRegion.
@@ -49,7 +53,7 @@ syn region jsxChild contained start=+{+ end=++ contains=jsBlock,javascriptBlock
4953
" and generic Flow type annotations (http://flowtype.org/).
5054
syn region jsxRegion
5155
\ contains=@Spell,@XMLSyntax,jsxRegion,jsxChild,jsBlock,javascriptBlock
52-
\ start=+\%(<\|\w\)\@<!<\z([a-zA-Z][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+
56+
\ start=+\%(<\|\w\)\@<!<\z([a-zA-Z_][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+
5357
\ skip=+<!--\_.\{-}-->+
5458
\ end=+</\z1\_\s\{-}>+
5559
\ end=+/>+

after/syntax/yaml.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ if version < 600
2121
endif
2222
syntax clear
2323

24-
syn match yamlBlock "[\[\]\{\}\|\>]"
24+
syn match yamlInline "[\[\]\{\}]"
25+
syn match yamlBlock "[>|]\d\?[+-]"
2526

2627
syn region yamlComment start="\#" end="$"
2728
syn match yamlIndicator "#YAML:\S\+"
2829

2930
syn region yamlString start="\(^\|\s\|\[\|\,\|\-\)'" end="'" skip="\\'"
3031
syn region yamlString start='"' end='"' skip='\\"' contains=yamlEscape
32+
syn region yamlString matchgroup=yamlBlock start=/[>|]\s*\n\+\z(\s\+\)\S/rs=s+1 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1
33+
syn region yamlString matchgroup=yamlBlock start=/[>|]\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+2 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1
34+
syn region yamlString matchgroup=yamlBlock start=/[>|]\d\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+3 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1
3135
syn match yamlEscape +\\[abfnrtv'"\\]+ contained
3236
syn match yamlEscape "\\\o\o\=\o\=" contained
3337
syn match yamlEscape "\\x\x\+" contained
@@ -53,6 +57,7 @@ hi link yamlKey Identifier
5357
hi link yamlType Type
5458

5559
hi link yamlComment Comment
60+
hi link yamlInline Operator
5661
hi link yamlBlock Operator
5762
hi link yamlString String
5863
hi link yamlEscape Special

autoload/crystal_lang.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ function! crystal_lang#format(option_str, ...) abort
310310
call setpos('.', pos_save)
311311
endfunction
312312

313+
function! crystal_lang#expand(file, pos, ...) abort
314+
return crystal_lang#tool('expand', a:file, a:pos, get(a:, 1, ''))
315+
endfunction
316+
313317
let &cpo = s:save_cpo
314318
unlet s:save_cpo
315319

0 commit comments

Comments
 (0)