mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 19:43:52 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45c1923f43 |
@@ -7,7 +7,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.
|
> 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 **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->189<!--/Package Count--> packages it consists of.
|
- It **installs and updates 120+ times faster** than the <!--Package Count-->190<!--/Package Count--> packages it consists of.
|
||||||
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
|
- 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.
|
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||||
@@ -132,6 +132,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [icalendar](https://github.com/chutzpah/icalendar.vim)
|
- [icalendar](https://github.com/chutzpah/icalendar.vim)
|
||||||
- [idris](https://github.com/idris-hackers/idris-vim)
|
- [idris](https://github.com/idris-hackers/idris-vim)
|
||||||
- [ion](https://github.com/vmchale/ion-vim)
|
- [ion](https://github.com/vmchale/ion-vim)
|
||||||
|
- [javascript-sql](https://github.com/statico/vim-javascript-sql)
|
||||||
- [javascript](https://github.com/pangloss/vim-javascript)
|
- [javascript](https://github.com/pangloss/vim-javascript)
|
||||||
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax)
|
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax)
|
||||||
- [jinja](https://github.com/lepture/vim-jinja)
|
- [jinja](https://github.com/lepture/vim-jinja)
|
||||||
|
|||||||
26
after/syntax/javascript/sql.vim
Normal file
26
after/syntax/javascript/sql.vim
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1
|
||||||
|
|
||||||
|
" Vim plugin
|
||||||
|
" Language: JavaScript
|
||||||
|
" Maintainer: Ian Langworth <ian@langworth.com>
|
||||||
|
|
||||||
|
if exists('b:current_syntax')
|
||||||
|
let s:current_syntax = b:current_syntax
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
exec 'syntax include @SQLSyntax syntax/' . g:javascript_sql_dialect . '.vim'
|
||||||
|
if exists('s:current_syntax')
|
||||||
|
let b:current_syntax = s:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
syntax region sqlTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=@SQLSyntax,jsTemplateExpression,jsSpecial extend
|
||||||
|
exec 'syntax match sqlTaggedTemplate +\%(SQL\)\%(`\)\@=+ nextgroup=sqlTemplateString'
|
||||||
|
|
||||||
|
hi def link sqlTemplateString jsTemplateString
|
||||||
|
hi def link sqlTaggedTemplate jsTaggedTemplate
|
||||||
|
|
||||||
|
syn cluster jsExpression add=sqlTaggedTemplate
|
||||||
|
syn cluster sqlTaggedTemplate add=sqlTemplateString
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -28,6 +28,9 @@ call s:SetDefault('g:markdown_enable_mappings', 0)
|
|||||||
" Enable jsx syntax by default
|
" Enable jsx syntax by default
|
||||||
call s:SetDefault('g:jsx_ext_required', 0)
|
call s:SetDefault('g:jsx_ext_required', 0)
|
||||||
|
|
||||||
|
" Needed for sql highlighting
|
||||||
|
call s:SetDefault('g:javascript_sql_dialect', 'sql')
|
||||||
|
|
||||||
" Make csv loading faster
|
" Make csv loading faster
|
||||||
call s:SetDefault('g:csv_start', 1)
|
call s:SetDefault('g:csv_start', 1)
|
||||||
call s:SetDefault('g:csv_end', 2)
|
call s:SetDefault('g:csv_end', 2)
|
||||||
@@ -573,6 +576,9 @@ if !has_key(s:disabled_packages, 'ion')
|
|||||||
au BufNewFile,BufRead ~/.config/ion/initrc setf ion
|
au BufNewFile,BufRead ~/.config/ion/initrc setf ion
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !has_key(s:disabled_packages, 'javascript-sql')
|
||||||
|
endif
|
||||||
|
|
||||||
if !has_key(s:disabled_packages, 'javascript')
|
if !has_key(s:disabled_packages, 'javascript')
|
||||||
au BufNewFile,BufRead *._js setf javascript
|
au BufNewFile,BufRead *._js setf javascript
|
||||||
au BufNewFile,BufRead *.bones setf javascript
|
au BufNewFile,BufRead *.bones setf javascript
|
||||||
|
|||||||
@@ -773,6 +773,11 @@ filetypes:
|
|||||||
extensions:
|
extensions:
|
||||||
- flow
|
- flow
|
||||||
---
|
---
|
||||||
|
name: javascript-sql
|
||||||
|
remote: statico/vim-javascript-sql
|
||||||
|
after: javascript
|
||||||
|
filetypes: []
|
||||||
|
---
|
||||||
name: jenkins
|
name: jenkins
|
||||||
remote: martinda/Jenkinsfile-vim-syntax
|
remote: martinda/Jenkinsfile-vim-syntax
|
||||||
filetypes:
|
filetypes:
|
||||||
|
|||||||
@@ -391,6 +391,9 @@ def generate_ftdetect(packages, heuristics)
|
|||||||
" Enable jsx syntax by default
|
" Enable jsx syntax by default
|
||||||
call s:SetDefault('g:jsx_ext_required', 0)
|
call s:SetDefault('g:jsx_ext_required', 0)
|
||||||
|
|
||||||
|
" Needed for sql highlighting
|
||||||
|
call s:SetDefault('g:javascript_sql_dialect', 'sql')
|
||||||
|
|
||||||
" Make csv loading faster
|
" Make csv loading faster
|
||||||
call s:SetDefault('g:csv_start', 1)
|
call s:SetDefault('g:csv_start', 1)
|
||||||
call s:SetDefault('g:csv_end', 2)
|
call s:SetDefault('g:csv_end', 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user