Add svelte support, closes #410

This commit is contained in:
Adam Stankiewicz
2019-06-14 16:07:20 +02:00
parent 2edc785a5e
commit 6b169212f8
10 changed files with 213 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ function! jsx_pretty#comment#update_commentstring(original)
let syn_start = s:syn_name(line('.'), 1)
let save_cursor = getcurpos()
if syn_start =~ '^jsx'
if syn_start =~? '^jsx'
let line = getline(".")
let start = len(matchstr(line, '^\s*'))
let syn_name = s:syn_name(line('.'), start + 1)
@@ -16,7 +16,7 @@ function! jsx_pretty#comment#update_commentstring(original)
let &l:commentstring = '// %s'
elseif s:syn_contains(line('.'), col('.'), 'jsxTaggedRegion')
let &l:commentstring = '<!-- %s -->'
elseif syn_name =~ '^jsxAttrib'
elseif syn_name =~? '^jsxAttrib'
let &l:commentstring = '// %s'
else
let &l:commentstring = '{/* %s */}'