diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-01-14 20:59:40 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-01-14 20:59:40 +0100 |
commit | 22040ce638ed610cfdbba03376ad9864a2a5d321 (patch) | |
tree | 43e3ef7cc1a17994bbf1460d0d000dd7e0723168 /syntax/pgsql.vim | |
parent | 7bde552a463999897320a1899a6ca4f8806041ea (diff) | |
download | vim-polyglot-22040ce638ed610cfdbba03376ad9864a2a5d321.tar.gz vim-polyglot-22040ce638ed610cfdbba03376ad9864a2a5d321.zip |
Update
Diffstat (limited to 'syntax/pgsql.vim')
-rw-r--r-- | syntax/pgsql.vim | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim index 81acfd2b..70c3d38c 100644 --- a/syntax/pgsql.vim +++ b/syntax/pgsql.vim @@ -9,7 +9,7 @@ endif " License: Vim license (see `:help license`) " Based on PostgreSQL 13.1 -" Automatically generated on 2020-12-30 at 10:21:40 +" Automatically generated on 2021-01-13 at 20:54:21 if exists("b:current_syntax") finish @@ -2010,20 +2010,26 @@ else \ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo endif -" Folding -syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo,plpgsql +let s:plgroups = 'plpgsql' " PL/<any other language> fun! s:add_syntax(s) - execute 'syn include @PL' . a:s . ' syntax/' . a:s . '.vim' + execute 'syn include @PL' .. a:s .. ' syntax/' .. a:s .. '.vim' unlet b:current_syntax - execute 'syn region pgsqlpl' . a:s . ' matchgroup=sqlString start=+\$' . a:s . '\$+ end=+\$' . a:s . '\$+ keepend contains=@PL' . a:s + execute 'syn region pgsqlpl' .. a:s .. ' matchgroup=sqlString start=+\$' .. a:s .. '\$+ end=+\$' .. a:s .. '\$+ keepend contains=@PL' .. a:s + let s:plgroups .= ',pgsqlpl' .. a:s endf for pl in get(b:, 'pgsql_pl', get(g:, 'pgsql_pl', [])) call s:add_syntax(pl) endfor +" Folding +execute "syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold " + \ .. "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," .. s:plgroups + +unlet s:plgroups + " Default highlighting hi def link sqlCatalog Constant hi def link sqlComment Comment |