diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-14 19:15:07 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-14 19:15:07 +0200 | 
| commit | a3bdbcdb3c60a9563fb90e02b28ae46cee5ef974 (patch) | |
| tree | 6e0b340417985e714838230de04d9610bdfb8677 /ftplugin | |
| parent | 34e01b8b62701afbd6b4ab1ffb4057617f540dce (diff) | |
| download | vim-polyglot-a3bdbcdb3c60a9563fb90e02b28ae46cee5ef974.tar.gz vim-polyglot-a3bdbcdb3c60a9563fb90e02b28ae46cee5ef974.zip | |
Fix svelte branch name, closes #522
Diffstat (limited to 'ftplugin')
| -rw-r--r-- | ftplugin/crystal.vim | 2 | ||||
| -rw-r--r-- | ftplugin/svelte.vim | 47 | 
2 files changed, 48 insertions, 1 deletions
| diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index f5b7e3a9..5553f00e 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -60,7 +60,7 @@ if exists('g:loaded_matchit') && !exists('b:match_words')    let b:match_words =          \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|struct\|lib\|macro\|ifdef\|def\|begin\|enum\|annotation\)\>=\@!' .          \ ':' . -        \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|next\)\>' . +        \ '\<\%(else\|elsif\|ensure\|when\|in\|rescue\|break\|next\)\>' .          \ ':' .          \ '\<end\>' .          \ ',{:},\[:\],(:)' diff --git a/ftplugin/svelte.vim b/ftplugin/svelte.vim new file mode 100644 index 00000000..3c3df23a --- /dev/null +++ b/ftplugin/svelte.vim @@ -0,0 +1,47 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 + +" Vim filetype plugin +" Language:   Svelte 3 (HTML/JavaScript) +" Author:     Evan Lecklider <evan@lecklider.com> +" Maintainer: Evan Lecklide <evan@lecklider.com> +" URL:        https://github.com/evanleck/vim-svelte +if (exists('b:did_ftplugin')) +  finish +endif +let b:did_ftplugin = 1 + +" Matchit support +if exists('loaded_matchit') && !exists('b:match_words') +  let b:match_ignorecase = 0 + +  " In order: +  " +  " 1. Svelte control flow keywords. +  " 2. Parens. +  " 3-5. HTML tags pulled from Vim itself. +  " +  " https://github.com/vim/vim/blob/5259275347667a90fb88d8ea74331f88ad68edfc/runtime/ftplugin/html.vim#L29-L35 +  let b:match_words = +        \ '#\%(if\|await\|each\)\>:\:\%(else\|catch\|then\)\>:\/\%(if\|await\|each\)\>,' . +        \ '{:},' . +        \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . +        \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . +        \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' +endif + +" ALE fixing and linting. +if exists('g:loaded_ale') +  if !exists('b:ale_fixers') +    let b:ale_fixers = ['eslint', 'prettier', 'prettier_standard'] +  endif + +  if !exists('b:ale_linter_aliases') +    let b:ale_linter_aliases = ['css', 'javascript'] +  endif + +  if !exists('b:ale_linters') +    let b:ale_linters = ['stylelint', 'eslint'] +  endif +endif + +endif | 
