mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -73,9 +73,6 @@ function! s:L2U_SetupGlobal()
|
|||||||
" Trigger for the previous mapping of <CR>
|
" Trigger for the previous mapping of <CR>
|
||||||
let s:l2u_fallback_trigger_cr = "\u0091L2UFallbackCR"
|
let s:l2u_fallback_trigger_cr = "\u0091L2UFallbackCR"
|
||||||
|
|
||||||
" Trigger for autosub completion cleanup autocommand
|
|
||||||
let s:l2u_autosub_cleanup_trigger = "\u0091L2UAutosubCleanup"
|
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Each time the filetype changes, we may need to enable or
|
" Each time the filetype changes, we may need to enable or
|
||||||
@@ -371,16 +368,14 @@ function! s:L2U_SetFallbackMapping(s, k)
|
|||||||
" general solution. Also, it doesn't work with <CR> since that stops
|
" general solution. Also, it doesn't work with <CR> since that stops
|
||||||
" parsing of the <C-R>=... expression, so we need to special-case it.
|
" parsing of the <C-R>=... expression, so we need to special-case it.
|
||||||
" Also, if the original mapping was intended to be recursive, this
|
" Also, if the original mapping was intended to be recursive, this
|
||||||
" will break it.
|
" will break it.
|
||||||
if mmdict["expr"]
|
if a:s != "<CR>"
|
||||||
if a:s != "<CR>"
|
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteral('" . a:s . "')\<CR>", 'g')
|
||||||
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteral('" . a:s . "')\<CR>", 'g')
|
else
|
||||||
else
|
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteralCR()\<CR>", 'g')
|
||||||
let rhs = substitute(rhs, '\c' . a:s, "\<C-R>=LaTeXtoUnicode#PutLiteralCR()\<CR>", 'g')
|
endif
|
||||||
endif
|
" Make the mapping silent even if it wasn't originally
|
||||||
" Make the mapping silent even if it wasn't originally
|
if !mmdict["silent"]
|
||||||
if !mmdict["silent"]
|
|
||||||
let pre = pre . '<silent>'
|
|
||||||
let pre = pre . '<silent>'
|
let pre = pre . '<silent>'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -631,7 +626,7 @@ function! LaTeXtoUnicode#AutoSub(...)
|
|||||||
let col1 = col('.')
|
let col1 = col('.')
|
||||||
let lnum = line('.')
|
let lnum = line('.')
|
||||||
if col1 == 1
|
if col1 == 1
|
||||||
if a:0 > 1
|
if a:0 > 1
|
||||||
call feedkeys(a:2, 'mi')
|
call feedkeys(a:2, 'mi')
|
||||||
endif
|
endif
|
||||||
let b:l2u_in_autosub = 0
|
let b:l2u_in_autosub = 0
|
||||||
@@ -641,7 +636,7 @@ function! LaTeXtoUnicode#AutoSub(...)
|
|||||||
let l = getline(lnum)[0 : col1-1-bs] . v:char
|
let l = getline(lnum)[0 : col1-1-bs] . v:char
|
||||||
let col0 = match(l, '\\\%([_^]\?[A-Za-z]\+\%' . col1 . 'c\%([^A-Za-z]\|$\)\|[_^]\%([0-9()=+-]\)\%' . col1 .'c\%(.\|$\)\)')
|
let col0 = match(l, '\\\%([_^]\?[A-Za-z]\+\%' . col1 . 'c\%([^A-Za-z]\|$\)\|[_^]\%([0-9()=+-]\)\%' . col1 .'c\%(.\|$\)\)')
|
||||||
if col0 == -1
|
if col0 == -1
|
||||||
if a:0 > 1
|
if a:0 > 1
|
||||||
call feedkeys(a:2, 'mi')
|
call feedkeys(a:2, 'mi')
|
||||||
endif
|
endif
|
||||||
let b:l2u_in_autosub = 0
|
let b:l2u_in_autosub = 0
|
||||||
@@ -650,33 +645,22 @@ function! LaTeXtoUnicode#AutoSub(...)
|
|||||||
let base = l[col0 : col1-1-bs]
|
let base = l[col0 : col1-1-bs]
|
||||||
let unicode = get(g:l2u_symbols_dict, base, '')
|
let unicode = get(g:l2u_symbols_dict, base, '')
|
||||||
if empty(unicode)
|
if empty(unicode)
|
||||||
if a:0 > 1
|
if a:0 > 1
|
||||||
call feedkeys(a:2, 'mi')
|
call feedkeys(a:2, 'mi')
|
||||||
endif
|
endif
|
||||||
let b:l2u_in_autosub = 0
|
let b:l2u_in_autosub = 0
|
||||||
return ''
|
return ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" create a temporary mapping to reset b:l2u_in_autosub when done
|
|
||||||
" (when invoked, it removes itself)
|
|
||||||
exec 'imap <buffer> ' . s:l2u_autosub_cleanup_trigger . ' <Plug>L2UAutosubReset'
|
|
||||||
inoremap <buffer><expr> <Plug>L2UAutosubReset <SID>L2U_AutosubReset()
|
|
||||||
|
|
||||||
" perform the substitution, wrapping it in undo breakpoints so that
|
" perform the substitution, wrapping it in undo breakpoints so that
|
||||||
" we can revert it as a whole
|
" we can revert it as a whole
|
||||||
call feedkeys("\<C-G>u", 'n')
|
" at the end, reset the l2u_in_autosub variable without leaving insert mode
|
||||||
call feedkeys(repeat("\b", len(base) + bs) . unicode . vc . s:l2u_esc_sequence, 'nt')
|
" the 'i' mode is the only one that works correctly when executing macros
|
||||||
call feedkeys("\<C-G>u", 'n')
|
" the 'n' mode is to avoid user-defined mappings of \b, <C-G> and <C-\><C-O>
|
||||||
" enqueue the reset mechanism
|
call feedkeys("\<C-G>u" .
|
||||||
call feedkeys(s:l2u_autosub_cleanup_trigger)
|
\ repeat("\b", len(base) + bs) . unicode . vc . s:l2u_esc_sequence .
|
||||||
return ''
|
\ "\<C-G>u" .
|
||||||
endfunction
|
\ "\<C-\>\<C-O>:let b:l2u_in_autosub = 0\<CR>",
|
||||||
|
|
||||||
function! s:L2U_AutosubReset()
|
|
||||||
" no longer doing substitution
|
|
||||||
let b:l2u_in_autosub = 0
|
|
||||||
" remove the mapping that triggered this function
|
|
||||||
exec 'iunmap <buffer> ' . s:l2u_autosub_cleanup_trigger
|
|
||||||
\ 'ni')
|
\ 'ni')
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -1195,7 +1195,7 @@ endfun
|
|||||||
fu! csv#Sort(bang, line1, line2, colnr) range "{{{3
|
fu! csv#Sort(bang, line1, line2, colnr) range "{{{3
|
||||||
" :Sort command
|
" :Sort command
|
||||||
let wsv = winsaveview()
|
let wsv = winsaveview()
|
||||||
let flag = matchstr(a:colnr, '[nixo]')
|
let flag = matchstr(a:colnr, '[nixof]')
|
||||||
call csv#CheckHeaderLine()
|
call csv#CheckHeaderLine()
|
||||||
let line1 = a:line1
|
let line1 = a:line1
|
||||||
let line2 = a:line2
|
let line2 = a:line2
|
||||||
@@ -2199,7 +2199,15 @@ fu! csv#CSVMappings() "{{{3
|
|||||||
call csv#Map('nnoremap', 'W', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
call csv#Map('nnoremap', 'W', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
||||||
call csv#Map('nnoremap', '<C-Right>', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
call csv#Map('nnoremap', '<C-Right>', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
||||||
call csv#Map('nnoremap', 'L', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
call csv#Map('nnoremap', 'L', ':<C-U>call csv#MoveCol(1, line("."))<CR>')
|
||||||
call csv#Map('nnoremap', 'E', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
try
|
||||||
|
if g:csv_bind_B == 1
|
||||||
|
call csv#Map('nnoremap', 'B', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
||||||
|
else
|
||||||
|
call csv#Map('nnoremap', 'E', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
||||||
|
endif
|
||||||
|
catch
|
||||||
|
call csv#Map('nnoremap', 'E', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
||||||
|
endtry
|
||||||
call csv#Map('nnoremap', '<C-Left>', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
call csv#Map('nnoremap', '<C-Left>', ':<C-U>call csv#MoveCol(-1, line("."))<CR>')
|
||||||
call csv#Map('nnoremap', 'H', ':<C-U>call csv#MoveCol(-1, line("."), 1)<CR>')
|
call csv#Map('nnoremap', 'H', ':<C-U>call csv#MoveCol(-1, line("."), 1)<CR>')
|
||||||
call csv#Map('nnoremap', 'K', ':<C-U>call csv#MoveCol(0, line(".")-v:count1)<CR>')
|
call csv#Map('nnoremap', 'K', ':<C-U>call csv#MoveCol(0, line(".")-v:count1)<CR>')
|
||||||
|
|||||||
@@ -2245,7 +2245,7 @@ if !has_key(g:polyglot_is_disabled, 'jsonnet')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(g:polyglot_is_disabled, 'json')
|
if !has_key(g:polyglot_is_disabled, 'json')
|
||||||
au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
|
au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}imgbotconfig,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !has_key(g:polyglot_is_disabled, 'json5')
|
if !has_key(g:polyglot_is_disabled, 'json5')
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ let s:globs = {
|
|||||||
\ 'jovial': '*.jov,*.j73,*.jovial',
|
\ 'jovial': '*.jov,*.j73,*.jovial',
|
||||||
\ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*',
|
\ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*',
|
||||||
\ 'jq': '*.jq,.jqrc,.jqrc*',
|
\ 'jq': '*.jq,.jqrc,.jqrc*',
|
||||||
\ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info',
|
\ 'json': '*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.imgbotconfig,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info',
|
||||||
\ 'json5': '*.json5',
|
\ 'json5': '*.json5',
|
||||||
\ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json',
|
\ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json',
|
||||||
\ 'jsonnet': '*.jsonnet,*.libsonnet',
|
\ 'jsonnet': '*.jsonnet,*.libsonnet',
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function! terraform#align() abort
|
|||||||
if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
|
if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
|
||||||
let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g'))
|
let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g'))
|
||||||
let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*'))
|
let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*'))
|
||||||
Tabularize/=/l1
|
Tabularize/=.*/l1
|
||||||
normal! 0
|
normal! 0
|
||||||
call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
||||||
endif
|
endif
|
||||||
@@ -67,6 +67,7 @@ function! terraform#commands(ArgLead, CmdLine, CursorPos) abort
|
|||||||
\ 'show',
|
\ 'show',
|
||||||
\ 'state',
|
\ 'state',
|
||||||
\ 'taint',
|
\ 'taint',
|
||||||
|
\ 'test',
|
||||||
\ 'untaint',
|
\ 'untaint',
|
||||||
\ 'version',
|
\ 'version',
|
||||||
\ 'workspace'
|
\ 'workspace'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types
|
" Vim support file to detect file types
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2021 Apr 05
|
" Last Change: 2021 Apr 17
|
||||||
|
|
||||||
" Listen very carefully, I will say this only once
|
" Listen very carefully, I will say this only once
|
||||||
if exists("did_load_filetypes")
|
if exists("did_load_filetypes")
|
||||||
@@ -417,6 +417,10 @@ endif
|
|||||||
" Lynx config files
|
" Lynx config files
|
||||||
au BufNewFile,BufRead lynx.cfg setf lynx
|
au BufNewFile,BufRead lynx.cfg setf lynx
|
||||||
|
|
||||||
|
" Modula-3 configuration language (must be before *.cfg and *makefile)
|
||||||
|
au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake
|
||||||
|
au BufNewFile,BufRead m3makefile,m3overrides setf m3build
|
||||||
|
|
||||||
" Quake
|
" Quake
|
||||||
au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
|
au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
|
||||||
au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
|
au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
|
||||||
@@ -596,7 +600,7 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
|
|||||||
au BufNewFile,BufRead *.factor setf factor
|
au BufNewFile,BufRead *.factor setf factor
|
||||||
|
|
||||||
" Fennel
|
" Fennel
|
||||||
autocmd BufRead,BufNewFile *.fnl setf fennel
|
autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||||
|
|
||||||
" Fetchmail RC file
|
" Fetchmail RC file
|
||||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||||
@@ -640,7 +644,7 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
|||||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||||
|
|
||||||
" Gift (Moodle)
|
" Gift (Moodle)
|
||||||
autocmd BufRead,BufNewFile *.gift setf gift
|
autocmd BufRead,BufNewFile *.gift setf gift
|
||||||
|
|
||||||
" Git
|
" Git
|
||||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||||
@@ -711,10 +715,10 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
|||||||
au BufNewFile,BufRead *.haml setf haml
|
au BufNewFile,BufRead *.haml setf haml
|
||||||
|
|
||||||
" Hamster Classic | Playground files
|
" Hamster Classic | Playground files
|
||||||
au BufNewFile,BufRead *.hsm setf hamster
|
au BufNewFile,BufRead *.hsm setf hamster
|
||||||
|
|
||||||
" Haskell
|
" Haskell
|
||||||
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell
|
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
|
||||||
au BufNewFile,BufRead *.lhs setf lhaskell
|
au BufNewFile,BufRead *.lhs setf lhaskell
|
||||||
au BufNewFile,BufRead *.chs setf chaskell
|
au BufNewFile,BufRead *.chs setf chaskell
|
||||||
au BufNewFile,BufRead cabal.project setf cabalproject
|
au BufNewFile,BufRead cabal.project setf cabalproject
|
||||||
@@ -1015,6 +1019,7 @@ au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
|||||||
|
|
||||||
" Meson Build system config
|
" Meson Build system config
|
||||||
au BufNewFile,BufRead meson.build,meson_options.txt setf meson
|
au BufNewFile,BufRead meson.build,meson_options.txt setf meson
|
||||||
|
au BufNewFile,BufRead *.wrap setf dosini
|
||||||
|
|
||||||
" Messages (logs mostly)
|
" Messages (logs mostly)
|
||||||
au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
|
au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
|
||||||
@@ -1045,10 +1050,10 @@ au BufNewFile,BufRead *.mod
|
|||||||
\ setf modsim3 |
|
\ setf modsim3 |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" Modula 2 (.md removed in favor of Markdown)
|
" Modula-2 (.md removed in favor of Markdown)
|
||||||
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
|
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
|
||||||
|
|
||||||
" Modula 3 (.m3, .i3, .mg, .ig)
|
" Modula-3 (.m3, .i3, .mg, .ig)
|
||||||
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||||
|
|
||||||
" Monk
|
" Monk
|
||||||
@@ -1191,6 +1196,9 @@ au BufNewFile,BufRead *.pp call polyglot#ft#FTpp()
|
|||||||
" Delphi or Lazarus program file
|
" Delphi or Lazarus program file
|
||||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||||
|
|
||||||
|
" Free Pascal makefile definition file
|
||||||
|
au BufNewFile,BufRead *.fpc setf fpcmake
|
||||||
|
|
||||||
" PDF
|
" PDF
|
||||||
au BufNewFile,BufRead *.pdf setf pdf
|
au BufNewFile,BufRead *.pdf setf pdf
|
||||||
|
|
||||||
@@ -1204,8 +1212,6 @@ else
|
|||||||
au BufNewFile,BufRead *.pl call polyglot#ft#FTpl()
|
au BufNewFile,BufRead *.pl call polyglot#ft#FTpl()
|
||||||
endif
|
endif
|
||||||
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
||||||
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
|
||||||
au BufNewFile,BufRead *.raku,*.rakumod setf perl6
|
|
||||||
|
|
||||||
" Perl, XPM or XPM2
|
" Perl, XPM or XPM2
|
||||||
au BufNewFile,BufRead *.pm
|
au BufNewFile,BufRead *.pm
|
||||||
@@ -1219,7 +1225,6 @@ au BufNewFile,BufRead *.pm
|
|||||||
|
|
||||||
" Perl POD
|
" Perl POD
|
||||||
au BufNewFile,BufRead *.pod setf pod
|
au BufNewFile,BufRead *.pod setf pod
|
||||||
au BufNewFile,BufRead *.pod6 setf pod6
|
|
||||||
|
|
||||||
" Php, php3, php4, etc.
|
" Php, php3, php4, etc.
|
||||||
" Also Phtml (was used for PHP 2 in the past)
|
" Also Phtml (was used for PHP 2 in the past)
|
||||||
@@ -1338,12 +1343,15 @@ au BufNewFile,BufRead *.pdb setf prolog
|
|||||||
" Promela
|
" Promela
|
||||||
au BufNewFile,BufRead *.pml setf promela
|
au BufNewFile,BufRead *.pml setf promela
|
||||||
|
|
||||||
|
" Property Specification Language (PSL)
|
||||||
|
au BufNewFile,BufRead *.psl setf psl
|
||||||
|
|
||||||
" Google protocol buffers
|
" Google protocol buffers
|
||||||
au BufNewFile,BufRead *.proto setf proto
|
au BufNewFile,BufRead *.proto setf proto
|
||||||
au BufNewFile,BufRead *.pbtxt setf pbtxt
|
au BufNewFile,BufRead *.pbtxt setf pbtxt
|
||||||
|
|
||||||
" Poke
|
" Poke
|
||||||
au BufNewFile,BufRead *.pk setf poke
|
au BufNewFile,BufRead *.pk setf poke
|
||||||
|
|
||||||
" Protocols
|
" Protocols
|
||||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||||
@@ -1359,6 +1367,9 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
|
|||||||
" Radiance
|
" Radiance
|
||||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||||
|
|
||||||
|
" Raku (formelly Perl6)
|
||||||
|
au BufNewFile,BufRead *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest setf raku
|
||||||
|
|
||||||
" Ratpoison config/command files
|
" Ratpoison config/command files
|
||||||
au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
|
au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ setlocal commentstring=#\ %s
|
|||||||
|
|
||||||
let &l:path =
|
let &l:path =
|
||||||
\ join([
|
\ join([
|
||||||
\ 'lib',
|
\ 'lib/**',
|
||||||
\ 'src',
|
\ 'src/**',
|
||||||
\ 'deps/**/lib',
|
\ 'test/**',
|
||||||
\ 'deps/**/src',
|
\ 'deps/**/lib/**',
|
||||||
|
\ 'deps/**/src/**',
|
||||||
\ &g:path
|
\ &g:path
|
||||||
\ ], ',')
|
\ ], ',')
|
||||||
setlocal includeexpr=elixir#util#get_filename(v:fname)
|
setlocal includeexpr=elixir#util#get_filename(v:fname)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
|
|||||||
else
|
else
|
||||||
setlocal keywordprg=git\ show
|
setlocal keywordprg=git\ show
|
||||||
endif
|
endif
|
||||||
if has('gui_running')
|
if has('gui_running') && &guioptions !~# '!'
|
||||||
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
|
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ if exists("loaded_matchit")
|
|||||||
" the 'begin' and 'end' keywords when they are used as a range rather than as
|
" the 'begin' and 'end' keywords when they are used as a range rather than as
|
||||||
" the delimiter of a block
|
" the delimiter of a block
|
||||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
|
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
|
||||||
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bsvr]\\|ip\\|MIME\\|big\\|raw\\|test\\|html\\|int128\\|Printf\\|Shell\\|Doc\\)\\?String\\|StringPrefixed\\|RegEx\\)\\>"'
|
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Macro\\|Dotted\\)\\>"'
|
||||||
|
|
||||||
let b:undo_ftplugin = b:undo_ftplugin
|
let b:undo_ftplugin = b:undo_ftplugin
|
||||||
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
|
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ endif
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: meson
|
" Language: meson
|
||||||
" License: VIM License
|
" License: VIM License
|
||||||
|
" Maintainer: Liam Beguin <liambeguin@gmail.com>
|
||||||
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||||
" Last Change: 2018 Nov 27
|
" Last Change: 2018 Nov 27
|
||||||
|
|
||||||
|
|||||||
43
ftplugin/modula2.vim
Normal file
43
ftplugin/modula2.vim
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula2', 'ftplugin/modula2.vim')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: Modula-2
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2021 Apr 08
|
||||||
|
|
||||||
|
if exists("b:did_ftplugin")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||||
|
setlocal commentstring=(*%s*)
|
||||||
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
|
|
||||||
|
if exists("loaded_matchit") && !exists("b:match_words")
|
||||||
|
" The second branch of the middle pattern is intended to match CASE labels
|
||||||
|
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||||
|
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' ..
|
||||||
|
\ ':' ..
|
||||||
|
\ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' ..
|
||||||
|
\ ':' ..
|
||||||
|
\ '\<END\>'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
|
let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" ..
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||||
|
\ "| unlet! b:browsefilter b:match_words"
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||||
42
ftplugin/modula3.vim
Normal file
42
ftplugin/modula3.vim
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula3', 'ftplugin/modula3.vim')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: Modula-3
|
||||||
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
" Last Change: 2021 Apr 08
|
||||||
|
|
||||||
|
if exists("b:did_ftplugin")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||||
|
setlocal commentstring=(*%s*)
|
||||||
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
|
|
||||||
|
if exists("loaded_matchit") && !exists("b:match_words")
|
||||||
|
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||||
|
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' ..
|
||||||
|
\ ':' ..
|
||||||
|
\ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' ..
|
||||||
|
\ ':' ..
|
||||||
|
\ '\<END\>'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
|
let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" ..
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||||
|
\ "| unlet! b:browsefilter b:match_words"
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||||
@@ -3,22 +3,52 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'pascal', 'ftplugin/pascal.vim
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: pascal
|
" Language: Pascal
|
||||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Changed: 11 Apr 2011
|
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
" Last Change: 2021 Apr 23
|
||||||
|
|
||||||
if exists("b:did_ftplugin") | finish | endif
|
if exists("b:did_ftplugin") | finish | endif
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
if exists("loaded_matchit")
|
let s:cpo_save = &cpo
|
||||||
let b:match_ignorecase = 1 " (pascal is case-insensitive)
|
set cpo&vim
|
||||||
|
|
||||||
let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>'
|
set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:}
|
||||||
let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>'
|
set commentstring={%s}
|
||||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
|
||||||
let b:match_words .= ',\<if\>:\<else\>'
|
if exists("pascal_delphi")
|
||||||
|
set comments+=:///
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Undo the stuff we changed.
|
if !exists("pascal_traditional")
|
||||||
let b:undo_ftplugin = "unlet! b:match_words"
|
set commentstring=//\ %s
|
||||||
|
set comments+=://
|
||||||
|
endif
|
||||||
|
|
||||||
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
|
|
||||||
|
if exists("loaded_matchit")
|
||||||
|
let b:match_ignorecase = 1 " (Pascal is case-insensitive)
|
||||||
|
|
||||||
|
let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>'
|
||||||
|
let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>'
|
||||||
|
let b:match_words .= ':\<end\>\.\@!'
|
||||||
|
|
||||||
|
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||||
|
" let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway.
|
||||||
|
let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
|
let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" .
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin = "setl fo< cms< com< " ..
|
||||||
|
\ "| unlet! b:browsefilter b:match_words b:match_ignorecase"
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
" Language: R Markdown file
|
" Language: R Markdown file
|
||||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||||
" Last Change: Sun Jul 22, 2018 06:51PM
|
" Last Change: Sat Aug 15, 2020 12:03PM
|
||||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||||
|
|
||||||
" Only do this when not yet done for this buffer
|
" Only do this when not yet done for this buffer
|
||||||
@@ -50,7 +50,7 @@ runtime ftplugin/pandoc.vim
|
|||||||
" Don't load another plugin for this buffer
|
" Don't load another plugin for this buffer
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
if has("gui_win32") && !exists("b:browsefilter")
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||||
\ "All Files (*.*)\t*.*\n"
|
\ "All Files (*.*)\t*.*\n"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
" Language: Rnoweb
|
" Language: Rnoweb
|
||||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||||
" Last Change: Tue Apr 07, 2015 04:37PM
|
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||||
|
|
||||||
" Only do this when not yet done for this buffer
|
" Only do this when not yet done for this buffer
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
@@ -28,7 +28,7 @@ setlocal iskeyword=@,48-57,_,.
|
|||||||
setlocal suffixesadd=.bib,.tex
|
setlocal suffixesadd=.bib,.tex
|
||||||
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
||||||
|
|
||||||
if has("gui_win32") && !exists("b:browsefilter")
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||||
\ "All Files (*.*)\t*.*\n"
|
\ "All Files (*.*)\t*.*\n"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
" Language: reStructuredText documentation format with R code
|
" Language: reStructuredText documentation format with R code
|
||||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||||
" Last Change: Wed Nov 01, 2017 10:47PM
|
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||||
" Original work by Alex Zvoleff
|
" Original work by Alex Zvoleff
|
||||||
|
|
||||||
" Only do this when not yet done for this buffer
|
" Only do this when not yet done for this buffer
|
||||||
@@ -41,7 +41,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g
|
|||||||
setlocal formatexpr=FormatRrst()
|
setlocal formatexpr=FormatRrst()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("gui_win32") && !exists("b:browsefilter")
|
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||||
\ "All Files (*.*)\t*.*\n"
|
\ "All Files (*.*)\t*.*\n"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: SystemVerilog
|
" Language: SystemVerilog
|
||||||
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
|
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
|
||||||
" Last Change: 12-Aug-2013.
|
" Last Change: 07-May-2021
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@@ -13,3 +13,36 @@ endif
|
|||||||
|
|
||||||
" Behaves just like Verilog
|
" Behaves just like Verilog
|
||||||
runtime! ftplugin/verilog.vim
|
runtime! ftplugin/verilog.vim
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" Add SystemVerilog keywords for matchit plugin.
|
||||||
|
if exists("loaded_matchit")
|
||||||
|
let b:match_words =
|
||||||
|
\ '\<begin\>:\<end\>,' .
|
||||||
|
\ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
|
||||||
|
\ '\<module\>:\<endmodule\>,' .
|
||||||
|
\ '\<if\>:`\@<!\<else\>,' .
|
||||||
|
\ '\<function\>:\<endfunction\>,' .
|
||||||
|
\ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
|
||||||
|
\ '\<task\>:\<endtask\>,' .
|
||||||
|
\ '\<specify\>:\<endspecify\>,' .
|
||||||
|
\ '\<config\>:\<endconfig\>,' .
|
||||||
|
\ '\<generate\>:\<endgenerate\>,' .
|
||||||
|
\ '\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,' .
|
||||||
|
\ '\<primitive\>:\<endprimitive\>,' .
|
||||||
|
\ '\<table\>:\<endtable\>,' .
|
||||||
|
\ '\<checker\>:\<endchecker\>,' .
|
||||||
|
\ '\<class\>:\<endclass\>,' .
|
||||||
|
\ '\<clocking\>:\<endclocking\>,' .
|
||||||
|
\ '\<gruop\>:\<endgruop\>,' .
|
||||||
|
\ '\<interface\>:\<endinterface\>,' .
|
||||||
|
\ '\<package\>:\<endpackage\>,' .
|
||||||
|
\ '\<program\>:\<endprogram\>,' .
|
||||||
|
\ '\<property\>:\<endproperty\>,' .
|
||||||
|
\ '\<sequence\>:\<endsequence\>'
|
||||||
|
endif
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function! _VFormatFile()
|
|||||||
else
|
else
|
||||||
let [_, lnum, colnum, _] = getpos('.')
|
let [_, lnum, colnum, _] = getpos('.')
|
||||||
%delete
|
%delete
|
||||||
call append(0, split(substitution, "\n"))
|
call setline(1, split(substitution, "\n"))
|
||||||
call cursor(lnum, colnum)
|
call cursor(lnum, colnum)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -23,11 +23,14 @@ if exists("*GetJuliaIndent")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:skipPatterns = '\<julia\%(Comprehension\%(For\|If\)\|RangeKeyword\|Comment\%([LM]\|Delim\)\|\%([bsv]\|ip\|big\|MIME\|Shell\|Printf\|Doc\)\=String\|RegEx\|SymbolS\?\)\>'
|
let s:skipPatternsBasic = '\<julia\%(Comment\%([LM]\|Delim\)\)\>'
|
||||||
|
let s:skipPatterns = '\<julia\%(Comprehension\%(For\|If\)\|RangeKeyword\|Comment\%([LM]\|Delim\)\|\%([bs]\|Shell\|Printf\|Doc\)\?String\|StringPrefixed\|DocStringM\(Raw\)\?\|RegEx\|SymbolS\?\|Macro\|Dotted\)\>'
|
||||||
|
|
||||||
function JuliaMatch(lnum, str, regex, st, ...)
|
function JuliaMatch(lnum, str, regex, st, ...)
|
||||||
let s = a:st
|
let s = a:st
|
||||||
let e = a:0 > 0 ? a:1 : -1
|
let e = a:0 > 0 ? a:1 : -1
|
||||||
|
let basic_skip = a:0 > 1 ? a:2 : 'all'
|
||||||
|
let skip = basic_skip ==# 'basic' ? s:skipPatternsBasic : s:skipPatterns
|
||||||
while 1
|
while 1
|
||||||
let f = match(a:str, '\C' . a:regex, s)
|
let f = match(a:str, '\C' . a:regex, s)
|
||||||
if e >= 0 && f >= e
|
if e >= 0 && f >= e
|
||||||
@@ -35,7 +38,8 @@ function JuliaMatch(lnum, str, regex, st, ...)
|
|||||||
endif
|
endif
|
||||||
if f >= 0
|
if f >= 0
|
||||||
let attr = synIDattr(synID(a:lnum,f+1,1),"name")
|
let attr = synIDattr(synID(a:lnum,f+1,1),"name")
|
||||||
if attr =~# s:skipPatterns
|
let attrT = synIDattr(synID(a:lnum,f+1,0),"name")
|
||||||
|
if attr =~# skip || attrT =~# skip
|
||||||
let s = f+1
|
let s = f+1
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
@@ -53,8 +57,8 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
let blocks_stack = []
|
let blocks_stack = []
|
||||||
let num_closed_blocks = 0
|
let num_closed_blocks = 0
|
||||||
while 1
|
while 1
|
||||||
let fb = JuliaMatch(a:lnum, line, '[@.]\@<!\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|\%(bare\)\?module\|quote\|do\)\>', s, e)
|
let fb = JuliaMatch(a:lnum, line, '\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|\%(bare\)\?module\|quote\|do\)\>', s, e)
|
||||||
let fe = JuliaMatch(a:lnum, line, '[@.]\@<!\<end\>', s, e)
|
let fe = JuliaMatch(a:lnum, line, '\<end\>', s, e)
|
||||||
|
|
||||||
if fb < 0 && fe < 0
|
if fb < 0 && fe < 0
|
||||||
" No blocks found
|
" No blocks found
|
||||||
@@ -66,13 +70,13 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
" Note: some keywords (elseif,else,catch,finally) are both
|
" Note: some keywords (elseif,else,catch,finally) are both
|
||||||
" closing blocks and opening new ones
|
" closing blocks and opening new ones
|
||||||
|
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<if\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<if\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
call add(blocks_stack, 'if')
|
call add(blocks_stack, 'if')
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<elseif\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<elseif\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
if len(blocks_stack) > 0 && blocks_stack[-1] == 'if'
|
if len(blocks_stack) > 0 && blocks_stack[-1] == 'if'
|
||||||
@@ -83,7 +87,7 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
endif
|
endif
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<else\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<else\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(else\)\=if\>'
|
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(else\)\=if\>'
|
||||||
@@ -95,13 +99,13 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<try\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<try\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
call add(blocks_stack, 'try')
|
call add(blocks_stack, 'try')
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<catch\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<catch\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
if len(blocks_stack) > 0 && blocks_stack[-1] == 'try'
|
if len(blocks_stack) > 0 && blocks_stack[-1] == 'try'
|
||||||
@@ -112,7 +116,7 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
endif
|
endif
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<finally\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<finally\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
if len(blocks_stack) > 0 && (blocks_stack[-1] == 'try' || blocks_stack[-1] == 'catch')
|
if len(blocks_stack) > 0 && (blocks_stack[-1] == 'try' || blocks_stack[-1] == 'catch')
|
||||||
@@ -124,7 +128,7 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<\%(bare\)\?module\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<\%(bare\)\?module\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
let s = i+1
|
let s = i+1
|
||||||
if i == 0
|
if i == 0
|
||||||
@@ -135,7 +139,7 @@ function GetJuliaNestingStruct(lnum, ...)
|
|||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let i = JuliaMatch(a:lnum, line, '[@.]\@<!\<\%(while\|for\|\%(staged\)\?function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|quote\|do\)\>', s)
|
let i = JuliaMatch(a:lnum, line, '\<\%(while\|for\|function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\|let\|quote\|do\)\>', s)
|
||||||
if i >= 0 && i == fb
|
if i >= 0 && i == fb
|
||||||
if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1
|
if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1
|
||||||
let s = i+11
|
let s = i+11
|
||||||
@@ -278,7 +282,7 @@ endfunction
|
|||||||
|
|
||||||
function IsInDocString(lnum)
|
function IsInDocString(lnum)
|
||||||
let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")')
|
let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")')
|
||||||
call filter(stack, 'v:val =~# "\\<juliaDocString\\(Delim\\|M\\)\\?\\>"')
|
call filter(stack, 'v:val =~# "\\<juliaDocString\\(Delim\\|M\\\(Raw\\)\\?\\)\\?\\>"')
|
||||||
return len(stack) > 0
|
return len(stack) > 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -449,7 +453,7 @@ function GetJuliaIndent()
|
|||||||
" reference point
|
" reference point
|
||||||
let cind = JuliaMatch(lnum, prevline, ':', indent(lnum), lim)
|
let cind = JuliaMatch(lnum, prevline, ':', indent(lnum), lim)
|
||||||
if cind >= 0
|
if cind >= 0
|
||||||
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', cind+1)
|
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', cind+1, -1, 'basic')
|
||||||
if nonwhiteind >= 0
|
if nonwhiteind >= 0
|
||||||
" return match(prevline, '\S', cind+1) " a bit overkill...
|
" return match(prevline, '\S', cind+1) " a bit overkill...
|
||||||
return cind + 2
|
return cind + 2
|
||||||
@@ -460,7 +464,7 @@ function GetJuliaIndent()
|
|||||||
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim)
|
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim)
|
||||||
if iind >= 0
|
if iind >= 0
|
||||||
" assuming whitespace after using... so no `using(XYZ)` please!
|
" assuming whitespace after using... so no `using(XYZ)` please!
|
||||||
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6)
|
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6, -1, 'basic')
|
||||||
if nonwhiteind >= 0
|
if nonwhiteind >= 0
|
||||||
return match(prevline, '\S', iind+6)
|
return match(prevline, '\S', iind+6)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ let s:comment_rx = '^\s*#'
|
|||||||
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||||
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||||
let s:continuation_rx = '\\$'
|
let s:continuation_rx = '\\$'
|
||||||
let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
|
let s:assignment_rx = '^\s*\h\w*\s*[+:?]\==\s*\zs.*\\$'
|
||||||
let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
|
let s:folded_assignment_rx = '^\s*\h\w*\s*[+:?]\=='
|
||||||
" TODO: This needs to be a lot more restrictive in what it matches.
|
" TODO: This needs to be a lot more restrictive in what it matches.
|
||||||
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
||||||
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ endif
|
|||||||
" Language: Meson
|
" Language: Meson
|
||||||
" License: VIM License
|
" License: VIM License
|
||||||
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
||||||
|
" Liam Beguin <liambeguin@gmail.com>
|
||||||
" Original Authors: David Bustos <bustos@caltech.edu>
|
" Original Authors: David Bustos <bustos@caltech.edu>
|
||||||
" Bram Moolenaar <Bram@vim.org>
|
" Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2015 Feb 23
|
" Last Change: 2015 Feb 23
|
||||||
@@ -28,7 +29,7 @@ if exists("*GetMesonIndent")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let s:keepcpo= &cpo
|
let s:keepcpo= &cpo
|
||||||
setlocal cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
" Come here when loading the script the first time.
|
" Come here when loading the script the first time.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
" Language: Rmd
|
" Language: Rmd
|
||||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||||
" Last Change: Sun Aug 19, 2018 09:14PM
|
" Last Change: Sun Mar 28, 2021 08:05PM
|
||||||
|
|
||||||
|
|
||||||
" Only load this indent file when no other was loaded.
|
" Only load this indent file when no other was loaded.
|
||||||
@@ -17,7 +17,7 @@ runtime indent/r.vim
|
|||||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|
||||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
setlocal indentkeys=0{,0},<:>,!^F,o,O,e
|
||||||
setlocal indentexpr=GetRmdIndent()
|
setlocal indentexpr=GetRmdIndent()
|
||||||
|
|
||||||
if exists("*GetRmdIndent")
|
if exists("*GetRmdIndent")
|
||||||
@@ -27,6 +27,21 @@ endif
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
|
" Simple Python indentation algorithm
|
||||||
|
function s:GetPyIndent()
|
||||||
|
let plnum = prevnonblank(v:lnum - 1)
|
||||||
|
let pline = getline(plnum)
|
||||||
|
let cline = getline(v:lnum)
|
||||||
|
if pline =~ '^s```\s*{\s*python '
|
||||||
|
return 0
|
||||||
|
elseif pline =~ ':$'
|
||||||
|
return indent(plnum) + &shiftwidth
|
||||||
|
elseif cline =~ 'else:$'
|
||||||
|
return indent(plnum) - &shiftwidth
|
||||||
|
endif
|
||||||
|
return indent(plnum)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function s:GetMdIndent()
|
function s:GetMdIndent()
|
||||||
let pline = getline(v:lnum - 1)
|
let pline = getline(v:lnum - 1)
|
||||||
let cline = getline(v:lnum)
|
let cline = getline(v:lnum)
|
||||||
@@ -41,13 +56,14 @@ function s:GetMdIndent()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function s:GetYamlIndent()
|
function s:GetYamlIndent()
|
||||||
let pline = getline(v:lnum - 1)
|
let plnum = prevnonblank(v:lnum - 1)
|
||||||
|
let pline = getline(plnum)
|
||||||
if pline =~ ':\s*$'
|
if pline =~ ':\s*$'
|
||||||
return indent(v:lnum) + shiftwidth()
|
return indent(plnum) + shiftwidth()
|
||||||
elseif pline =~ '^\s*- '
|
elseif pline =~ '^\s*- '
|
||||||
return indent(v:lnum) + 2
|
return indent(v:lnum) + 2
|
||||||
endif
|
endif
|
||||||
return indent(prevnonblank(v:lnum - 1))
|
return indent(plnum)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function GetRmdIndent()
|
function GetRmdIndent()
|
||||||
@@ -56,9 +72,11 @@ function GetRmdIndent()
|
|||||||
endif
|
endif
|
||||||
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
||||||
return s:RIndent()
|
return s:RIndent()
|
||||||
elseif v:lnum > 1 && search('^---$', "bnW") == 1 &&
|
elseif v:lnum > 1 && (search('^---$', "bnW") == 1 &&
|
||||||
\ (search('^---$', "nW") > v:lnum || search('^...$', "nW") > v:lnum)
|
\ (search('^---$', "nW") > v:lnum || search('^\.\.\.$', "nW") > v:lnum))
|
||||||
return s:GetYamlIndent()
|
return s:GetYamlIndent()
|
||||||
|
elseif search('^[ \t]*```{python', "bncW") > search('^[ \t]*```$', "bncW")
|
||||||
|
return s:GetPyIndent()
|
||||||
else
|
else
|
||||||
return s:GetMdIndent()
|
return s:GetMdIndent()
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ function GetRSTIndent()
|
|||||||
let psnum = s:get_paragraph_start()
|
let psnum = s:get_paragraph_start()
|
||||||
if psnum != 0
|
if psnum != 0
|
||||||
if getline(psnum) =~ s:note_pattern
|
if getline(psnum) =~ s:note_pattern
|
||||||
let ind = 3
|
let ind = max([3, ind])
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -87,29 +87,44 @@ execute 'syn keyword ansible_debug_keywords debug containedin='.s:yamlKey.' cont
|
|||||||
highlight default link ansible_debug_keywords Debug
|
highlight default link ansible_debug_keywords Debug
|
||||||
|
|
||||||
if exists("g:ansible_extra_keywords_highlight")
|
if exists("g:ansible_extra_keywords_highlight")
|
||||||
execute 'syn keyword ansible_extra_special_keywords register always_run changed_when failed_when no_log args vars delegate_to ignore_errors containedin='.s:yamlKey.' contained'
|
execute 'syn keyword ansible_extra_special_keywords
|
||||||
highlight link ansible_extra_special_keywords Statement
|
\ become become_exe become_flags become_method become_user become_pass prompt_l10n
|
||||||
|
\ debugger always_run check_mode diff no_log args tags force_handlers
|
||||||
|
\ vars vars_files vars_prompt delegate_facts delegate_to
|
||||||
|
\ any_errors_fatal ignore_errors ignore_unreachable max_fail_percentage
|
||||||
|
\ connection hosts port remote_user module_defaults
|
||||||
|
\ environment fact_path gather_facts gather_subset gather_timeout
|
||||||
|
\ async poll throttle timeout order run_once serial strategy
|
||||||
|
\ containedin='.s:yamlKey.' contained'
|
||||||
|
if exists("g:ansible_extra_keywords_highlight_group")
|
||||||
|
execute 'highlight link ansible_extra_special_keywords '.g:ansible_extra_keywords_highlight_group
|
||||||
|
else
|
||||||
|
highlight link ansible_extra_special_keywords Structure
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'syn keyword ansible_normal_keywords include include_tasks import_tasks until retries delay when only_if become become_user block rescue always notify containedin='.s:yamlKey.' contained'
|
execute 'syn keyword ansible_normal_keywords
|
||||||
|
\ include include_role include_tasks include_vars import_role import_playbook import_tasks
|
||||||
|
\ when changed_when failed_when block rescue always notify listen register
|
||||||
|
\ action local_action post_tasks pre_tasks tasks handlers roles collections
|
||||||
|
\ containedin='.s:yamlKey.' contained'
|
||||||
if exists("g:ansible_normal_keywords_highlight")
|
if exists("g:ansible_normal_keywords_highlight")
|
||||||
execute 'highlight link ansible_normal_keywords '.g:ansible_normal_keywords_highlight
|
execute 'highlight link ansible_normal_keywords '.g:ansible_normal_keywords_highlight
|
||||||
else
|
else
|
||||||
highlight default link ansible_normal_keywords Statement
|
highlight default link ansible_normal_keywords Statement
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'syn match ansible_with_keywords "\vwith_.+" containedin='.s:yamlKey.' contained'
|
execute 'syn keyword ansible_loop_keywords
|
||||||
if exists("g:ansible_with_keywords_highlight")
|
\ loop loop_control until retries delay
|
||||||
execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
|
\ containedin='.s:yamlKey.' contained'
|
||||||
|
execute 'syn match ansible_loop_keywords "\vwith_.+" containedin='.s:yamlKey.' contained'
|
||||||
|
if exists("g:ansible_loop_keywords_highlight")
|
||||||
|
execute 'highlight link ansible_loop_keywords '.g:ansible_loop_keywords_highlight
|
||||||
|
" backward compatibility: ansible_with_keywords_highlight replaced by ansible_loop_keywords_highlight
|
||||||
|
elseif exists("g:ansible_with_keywords_highlight")
|
||||||
|
execute 'highlight link ansible_loop_keywords '.g:ansible_with_keywords_highlight
|
||||||
else
|
else
|
||||||
highlight default link ansible_with_keywords Statement
|
highlight default link ansible_loop_keywords Statement
|
||||||
endif
|
|
||||||
|
|
||||||
execute 'syn keyword ansible_with_keywords loop containedin='.s:yamlKey.' contained'
|
|
||||||
if exists("g:ansible_with_keywords_highlight")
|
|
||||||
execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
|
|
||||||
else
|
|
||||||
highlight default link ansible_with_keywords Statement
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "ansible"
|
let b:current_syntax = "ansible"
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ syntax keyword typescriptAsyncFuncKeyword await
|
|||||||
\ nextgroup=@typescriptValue
|
\ nextgroup=@typescriptValue
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
|
|
||||||
syntax keyword typescriptFuncKeyword function
|
exec 'syntax keyword typescriptFuncKeyword '.(exists('g:typescript_conceal_function') ? 'conceal cchar='.g:typescript_conceal_function : '').' function nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature skipwhite skipempty'
|
||||||
\ nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature
|
|
||||||
\ skipwhite skipempty
|
|
||||||
|
|
||||||
syntax match typescriptAsyncFunc contained /*/
|
syntax match typescriptAsyncFunc contained /*/
|
||||||
\ nextgroup=typescriptFuncName,@typescriptCallSignature
|
\ nextgroup=typescriptFuncName,@typescriptCallSignature
|
||||||
|
|||||||
@@ -16,19 +16,11 @@ syntax match typescriptExportType /\<type\s*{\@=/
|
|||||||
\ contained skipwhite skipempty skipnl
|
\ contained skipwhite skipempty skipnl
|
||||||
syntax keyword typescriptModule namespace module
|
syntax keyword typescriptModule namespace module
|
||||||
|
|
||||||
"this
|
|
||||||
|
|
||||||
"JavaScript Prototype
|
|
||||||
syntax keyword typescriptPrototype prototype
|
|
||||||
\ nextgroup=@afterIdentifier
|
|
||||||
|
|
||||||
syntax keyword typescriptCastKeyword as
|
syntax keyword typescriptCastKeyword as
|
||||||
\ nextgroup=@typescriptType
|
\ nextgroup=@typescriptType
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
|
|
||||||
"Program Keywords
|
|
||||||
syntax keyword typescriptIdentifier arguments this super
|
|
||||||
\ nextgroup=@afterIdentifier
|
|
||||||
|
|
||||||
syntax keyword typescriptVariable let var
|
syntax keyword typescriptVariable let var
|
||||||
\ nextgroup=@typescriptVariableDeclarations
|
\ nextgroup=@typescriptVariableDeclarations
|
||||||
@@ -50,7 +42,6 @@ syntax keyword typescriptOperator delete new typeof void
|
|||||||
|
|
||||||
syntax keyword typescriptForOperator contained in of
|
syntax keyword typescriptForOperator contained in of
|
||||||
syntax keyword typescriptBoolean true false nextgroup=@typescriptSymbols skipwhite skipempty
|
syntax keyword typescriptBoolean true false nextgroup=@typescriptSymbols skipwhite skipempty
|
||||||
syntax keyword typescriptNull null undefined nextgroup=@typescriptSymbols skipwhite skipempty
|
|
||||||
syntax keyword typescriptMessage alert confirm prompt status
|
syntax keyword typescriptMessage alert confirm prompt status
|
||||||
\ nextgroup=typescriptDotNotation,typescriptFuncCallArg
|
\ nextgroup=typescriptDotNotation,typescriptFuncCallArg
|
||||||
syntax keyword typescriptGlobal self top parent
|
syntax keyword typescriptGlobal self top parent
|
||||||
@@ -68,7 +59,6 @@ syntax keyword typescriptCase case nextgroup=@typescriptPrimiti
|
|||||||
syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite oneline
|
syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite oneline
|
||||||
syntax keyword typescriptStatementKeyword with
|
syntax keyword typescriptStatementKeyword with
|
||||||
syntax keyword typescriptStatementKeyword yield skipwhite nextgroup=@typescriptValue containedin=typescriptBlock
|
syntax keyword typescriptStatementKeyword yield skipwhite nextgroup=@typescriptValue containedin=typescriptBlock
|
||||||
syntax keyword typescriptStatementKeyword return skipwhite contained nextgroup=@typescriptValue containedin=typescriptBlock
|
|
||||||
|
|
||||||
syntax keyword typescriptTry try
|
syntax keyword typescriptTry try
|
||||||
syntax keyword typescriptExceptions catch throw finally
|
syntax keyword typescriptExceptions catch throw finally
|
||||||
@@ -98,3 +88,15 @@ syntax cluster typescriptAmbients contains=
|
|||||||
\ typescriptAbstract,
|
\ typescriptAbstract,
|
||||||
\ typescriptEnumKeyword,typescriptEnum,
|
\ typescriptEnumKeyword,typescriptEnum,
|
||||||
\ typescriptModule
|
\ typescriptModule
|
||||||
|
|
||||||
|
syntax keyword typescriptIdentifier arguments nextgroup=@afterIdentifier
|
||||||
|
|
||||||
|
"Program Keywords
|
||||||
|
exec 'syntax keyword typescriptNull null '.(exists('g:typescript_conceal_null') ? 'conceal cchar='.g:typescript_conceal_null : '').' nextgroup=@typescriptSymbols skipwhite skipempty'
|
||||||
|
exec 'syntax keyword typescriptNull undefined '.(exists('g:typescript_conceal_undefined') ? 'conceal cchar='.g:typescript_conceal_undefined : '').' nextgroup=@typescriptSymbols skipwhite skipempty'
|
||||||
|
"this
|
||||||
|
exec 'syntax keyword typescriptIdentifier this '.(exists('g:typescript_conceal_this') ? 'conceal cchar='.g:typescript_conceal_this : '').' nextgroup=@afterIdentifier'
|
||||||
|
exec 'syntax keyword typescriptIdentifier super '.(exists('g:typescript_conceal_super') ? 'conceal cchar='.g:typescript_conceal_super : '').' nextgroup=@afterIdentifier'
|
||||||
|
"JavaScript Prototype
|
||||||
|
exec 'syntax keyword typescriptPrototype prototype '.(exists('g:typescript_conceal_prototype') ? 'conceal cchar='.g:typescript_conceal_prototype : '').' nextgroup=@afterIdentifier'
|
||||||
|
exec 'syntax keyword typescriptStatementKeyword return '.(exists('g:typescript_conceal_return') ? 'conceal cchar='.g:typescript_conceal_return : '').' skipwhite contained nextgroup=@typescriptValue containedin=typescriptBlock'
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ delfunction s:syntax_keyword
|
|||||||
" * Must not end in a : or /
|
" * Must not end in a : or /
|
||||||
" * Must not have two adjacent colons except at the beginning
|
" * Must not have two adjacent colons except at the beginning
|
||||||
" * Must not contain any reader metacharacters except for ' and #
|
" * Must not contain any reader metacharacters except for ' and #
|
||||||
syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@1<!>"
|
syntax match clojureKeyword "\v<:{1,2}([^ \n\r\t()\[\]{}";@^`~\\/]+/)*[^ \n\r\t()\[\]{}";@^`~\\/]+:@1<!>"
|
||||||
|
|
||||||
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
|
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: generic configure file
|
" Language: generic configure file
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2005 Jun 20
|
" Last Change: 2021 May 01
|
||||||
|
|
||||||
" Quit when a (custom) syntax file was already loaded
|
" Quit when a (custom) syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -14,8 +14,8 @@ endif
|
|||||||
|
|
||||||
syn keyword confTodo contained TODO FIXME XXX
|
syn keyword confTodo contained TODO FIXME XXX
|
||||||
" Avoid matching "text#text", used in /etc/disktab and /etc/gettytab
|
" Avoid matching "text#text", used in /etc/disktab and /etc/gettytab
|
||||||
syn match confComment "^#.*" contains=confTodo
|
syn match confComment "^#.*" contains=confTodo,@Spell
|
||||||
syn match confComment "\s#.*"ms=s+1 contains=confTodo
|
syn match confComment "\s#.*"ms=s+1 contains=confTodo,@Spell
|
||||||
syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
|
syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
|
||||||
syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline
|
syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
" Language: C++
|
" Language: C++
|
||||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||||
" Last Change: 2021 Jan 12
|
" Last Change: 2021 May 04
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -48,33 +48,45 @@ if !exists("cpp_no_cpp11")
|
|||||||
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
||||||
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
||||||
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
||||||
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"\(sv\|s\|_[_a-zA-Z][_a-zA-Z0-9]*\)\=+ contains=@Spell
|
||||||
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
|
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
|
||||||
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
|
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" C++ 14 extensions
|
" C++ 14 extensions
|
||||||
if !exists("cpp_no_cpp14")
|
if !exists("cpp_no_cpp14")
|
||||||
syn case ignore
|
syn match cppNumbers display transparent "\<\d\|\.\d" contains=cppNumber,cppFloat
|
||||||
syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
syn match cppNumber display contained "\<0\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat
|
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
syn match cppNumber display contained "\<0\o\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
syn case match
|
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
endif
|
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
|
syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
" C++ 20 extensions
|
syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
if !exists("cpp_no_cpp20")
|
syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
syn keyword cppStatement co_await co_return co_yield requires
|
syn region cppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
|
||||||
syn keyword cppStorageClass consteval constinit
|
|
||||||
syn keyword cppStructure concept
|
|
||||||
syn keyword cppType char8_t
|
|
||||||
syn keyword cppModule import module export
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" C++ 17 extensions
|
" C++ 17 extensions
|
||||||
if !exists("cpp_no_cpp17")
|
if !exists("cpp_no_cpp17")
|
||||||
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
|
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
|
||||||
syn match cppCast "\<reinterpret_pointer_cast\s*$"
|
syn match cppCast "\<reinterpret_pointer_cast\s*$"
|
||||||
|
syn match cppFloat display contained "\<0x\x*\.\x\+p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
|
syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" C++ 20 extensions
|
||||||
|
if !exists("cpp_no_cpp20")
|
||||||
|
syn match cppNumber display contained "\<0\(y\|d\)\>"
|
||||||
|
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\(y\|d\)\>"
|
||||||
|
syn match cppNumber display contained "\<0\o\+\(y\|d\)\>"
|
||||||
|
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\(y\|d\)\>"
|
||||||
|
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\(y\|d\)\>"
|
||||||
|
syn keyword cppStatement co_await co_return co_yield requires
|
||||||
|
syn keyword cppStorageClass consteval constinit
|
||||||
|
syn keyword cppStructure concept
|
||||||
|
syn keyword cppType char8_t
|
||||||
|
syn keyword cppModule import module export
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" The minimum and maximum operators in GNU C++
|
" The minimum and maximum operators in GNU C++
|
||||||
@@ -94,7 +106,9 @@ hi def link cppBoolean Boolean
|
|||||||
hi def link cppConstant Constant
|
hi def link cppConstant Constant
|
||||||
hi def link cppRawStringDelimiter Delimiter
|
hi def link cppRawStringDelimiter Delimiter
|
||||||
hi def link cppRawString String
|
hi def link cppRawString String
|
||||||
|
hi def link cppString String
|
||||||
hi def link cppNumber Number
|
hi def link cppNumber Number
|
||||||
|
hi def link cppFloat Number
|
||||||
hi def link cppModule Include
|
hi def link cppModule Include
|
||||||
|
|
||||||
let b:current_syntax = "cpp"
|
let b:current_syntax = "cpp"
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ fu! <sid>CheckSaneSearchPattern() "{{{3
|
|||||||
let s:col = get(b:, 'col', s:col_def)
|
let s:col = get(b:, 'col', s:col_def)
|
||||||
let s:col_end = get(b:, 'col_end', s:col_def_end)
|
let s:col_end = get(b:, 'col_end', s:col_def_end)
|
||||||
let s:del = get(b:, 'delimiter', s:del_def)
|
let s:del = get(b:, 'delimiter', s:del_def)
|
||||||
let s:cmts = b:csv_cmt[0]
|
let s:cmts = get(get(b:, 'csv_cmt', ['']), 0)
|
||||||
let s:cmte = len(b:csv_cmt) == 2 ? b:csv_cmt[1] : ''
|
let s:cmte = len(get(b:, 'csv_cmt', [])) == 2 ? b:csv_cmt[1] : ''
|
||||||
" Make the file start at the first actual CSV record (issue #71)
|
" Make the file start at the first actual CSV record (issue #71)
|
||||||
if !exists("b:csv_headerline")
|
if !exists("b:csv_headerline") && !empty(s:cmts)
|
||||||
let cmts = <sid>Esc(s:cmts, '')
|
let cmts = <sid>Esc(s:cmts, '')
|
||||||
let pattern = '\%^\(\%('.cmts.'.*\n\)\|\%(\s*\n\)\)\+'
|
let pattern = '\%^\(\%('.cmts.'.*\n\)\|\%(\s*\n\)\)\+'
|
||||||
let start = search(pattern, 'nWe', 10)
|
let start = search(pattern, 'nWe', 10)
|
||||||
@@ -87,6 +87,7 @@ fu! <sid>CheckSaneSearchPattern() "{{{3
|
|||||||
if line('$') > 1 && (!exists("b:col") || empty(b:col))
|
if line('$') > 1 && (!exists("b:col") || empty(b:col))
|
||||||
" check for invalid pattern, ftplugin hasn't been loaded yet
|
" check for invalid pattern, ftplugin hasn't been loaded yet
|
||||||
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
|
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
|
||||||
|
call <sid>Warning("Or ftplugin hasn't been sourced before the syntax script")
|
||||||
endif
|
endif
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: dts/dtsi (device tree files)
|
" Language: dts/dtsi (device tree files)
|
||||||
" Maintainer: Daniel Mack <vim@zonque.org>
|
" Maintainer: Daniel Mack <vim@zonque.org>
|
||||||
" Last Change: 2013 Oct 20
|
" Last Change: 2021 May 15
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -22,6 +22,38 @@ syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinar
|
|||||||
syntax region dtsCommentInner start="/\*" end="\*/"
|
syntax region dtsCommentInner start="/\*" end="\*/"
|
||||||
syntax match dtsCommentLine "//.*$"
|
syntax match dtsCommentLine "//.*$"
|
||||||
|
|
||||||
|
" Accept %: for # (C99)
|
||||||
|
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||||
|
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||||
|
if !exists("c_no_if0")
|
||||||
|
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||||
|
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||||
|
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||||
|
if !exists("c_no_if0_fold")
|
||||||
|
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||||
|
else
|
||||||
|
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||||
|
endif
|
||||||
|
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||||
|
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||||
|
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||||
|
if !exists("c_no_if0_fold")
|
||||||
|
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||||
|
else
|
||||||
|
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||||
|
endif
|
||||||
|
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||||
|
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||||
|
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||||
|
endif
|
||||||
|
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||||
|
syn match cIncluded display contained "<[^>]*>"
|
||||||
|
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||||
|
"syn match cLineSkip "\\$"
|
||||||
|
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
|
||||||
|
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||||
|
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||||
|
|
||||||
hi def link dtsCellProperty Number
|
hi def link dtsCellProperty Number
|
||||||
hi def link dtsBinaryProperty Number
|
hi def link dtsBinaryProperty Number
|
||||||
hi def link dtsStringProperty String
|
hi def link dtsStringProperty String
|
||||||
@@ -32,3 +64,19 @@ hi def link dtsReference Macro
|
|||||||
hi def link dtsComment Comment
|
hi def link dtsComment Comment
|
||||||
hi def link dtsCommentInner Comment
|
hi def link dtsCommentInner Comment
|
||||||
hi def link dtsCommentLine Comment
|
hi def link dtsCommentLine Comment
|
||||||
|
|
||||||
|
hi def link cInclude Include
|
||||||
|
hi def link cPreProc PreProc
|
||||||
|
hi def link cDefine Macro
|
||||||
|
hi def link cIncluded cString
|
||||||
|
hi def link cString String
|
||||||
|
|
||||||
|
hi def link cCppInWrapper cCppOutWrapper
|
||||||
|
hi def link cCppOutWrapper cPreCondit
|
||||||
|
hi def link cPreConditMatch cPreCondit
|
||||||
|
hi def link cPreCondit PreCondit
|
||||||
|
hi def link cCppOutSkip cCppOutIf2
|
||||||
|
|
||||||
|
hi def link cCppInElse2 cCppOutIf2
|
||||||
|
hi def link cCppOutIf2 cCppOut
|
||||||
|
hi def link cCppOut Comment
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff
|
|||||||
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
||||||
syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff
|
syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff
|
||||||
|
|
||||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\|summary\|boundary\|filename\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite contains=@NoSpell
|
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\|summary\|boundary\|filename\|previous\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite contains=@NoSpell
|
||||||
syn match gitKeyword /^previous\>/ contained containedin=gitHead nextgroup=gitHash skipwhite contains=@NoSpell
|
|
||||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell
|
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell
|
||||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
|
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell
|
||||||
syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||||
|
|||||||
@@ -26,7 +26,10 @@ syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLi
|
|||||||
syn match gitcommitOverflow ".*" contained contains=@Spell
|
syn match gitcommitOverflow ".*" contained contains=@Spell
|
||||||
syn match gitcommitBlank "^[^#].*" contained contains=@Spell
|
syn match gitcommitBlank "^[^#].*" contained contains=@Spell
|
||||||
|
|
||||||
if get(g:, "gitcommit_cleanup") is# "scissors"
|
syn match gitcommitTrailers "\n\@<=\n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*#\|\n*\%$\)\@="
|
||||||
|
syn match gitcommitTrailerToken "^[[:alnum:]-]\+\s*:" contained containedin=gitcommitTrailers
|
||||||
|
|
||||||
|
if get(b:, "gitcommit_cleanup", get(g:, "gitcommit_cleanup", "")) is# "scissors"
|
||||||
syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl
|
syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl
|
||||||
syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff
|
syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff
|
||||||
else
|
else
|
||||||
@@ -67,6 +70,7 @@ syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning
|
|||||||
syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
|
syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$"
|
||||||
|
|
||||||
hi def link gitcommitSummary Keyword
|
hi def link gitcommitSummary Keyword
|
||||||
|
hi def link gitcommitTrailerToken Label
|
||||||
hi def link gitcommitComment Comment
|
hi def link gitcommitComment Comment
|
||||||
hi def link gitcommitUntracked gitcommitComment
|
hi def link gitcommitUntracked gitcommitComment
|
||||||
hi def link gitcommitDiscarded gitcommitComment
|
hi def link gitcommitDiscarded gitcommitComment
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite
|
|||||||
syn match gitrebaseReset "\v^(t|reset)=>" nextgroup=gitrebaseName skipwhite
|
syn match gitrebaseReset "\v^(t|reset)=>" nextgroup=gitrebaseName skipwhite
|
||||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||||
syn match gitrebaseCommand ".*" contained
|
syn match gitrebaseCommand ".*" contained
|
||||||
|
syn match gitrebaseEmpty " \zs# empty$" containedin=gitrebaseSummary contained
|
||||||
|
syn match gitrebaseComment "# " containedin=gitrebaseEmpty contained
|
||||||
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
||||||
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained
|
syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained
|
||||||
@@ -52,6 +54,7 @@ hi def link gitrebaseMerge Exception
|
|||||||
hi def link gitrebaseLabel Label
|
hi def link gitrebaseLabel Label
|
||||||
hi def link gitrebaseReset Keyword
|
hi def link gitrebaseReset Keyword
|
||||||
hi def link gitrebaseSummary String
|
hi def link gitrebaseSummary String
|
||||||
|
hi def link gitrebaseEmpty Error
|
||||||
hi def link gitrebaseComment Comment
|
hi def link gitrebaseComment Comment
|
||||||
hi def link gitrebaseSquashError Error
|
hi def link gitrebaseSquashError Error
|
||||||
hi def link gitrebaseMergeCommit gitrebaseCommit
|
hi def link gitrebaseMergeCommit gitrebaseCommit
|
||||||
|
|||||||
@@ -169,11 +169,11 @@ syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=g
|
|||||||
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||||
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||||
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_]\|__\)\S*\|_\)\>"
|
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
|
||||||
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||||
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||||
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||||
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_]\S*\|__\S*\|_\)\>"
|
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
|
||||||
|
|
||||||
hi def link goDecimalInt Integer
|
hi def link goDecimalInt Integer
|
||||||
hi def link goDecimalError Error
|
hi def link goDecimalError Error
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Vim help file
|
" Language: Vim help file
|
||||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||||
" Last Change: 2019 May 12
|
" Last Change: 2020 Jul 28
|
||||||
|
|
||||||
" Quit when a (custom) syntax file was already loaded
|
" Quit when a (custom) syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -15,7 +15,7 @@ endif
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1
|
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)"
|
||||||
syn match helpSectionDelim "^===.*===$"
|
syn match helpSectionDelim "^===.*===$"
|
||||||
syn match helpSectionDelim "^---.*--$"
|
syn match helpSectionDelim "^---.*--$"
|
||||||
if has("conceal")
|
if has("conceal")
|
||||||
@@ -89,6 +89,7 @@ syn match helpSpecial "\[group]"
|
|||||||
syn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]"
|
syn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]"
|
||||||
|
|
||||||
syn match helpSpecial "CTRL-."
|
syn match helpSpecial "CTRL-."
|
||||||
|
syn match helpSpecial "CTRL-SHIFT-."
|
||||||
syn match helpSpecial "CTRL-Break"
|
syn match helpSpecial "CTRL-Break"
|
||||||
syn match helpSpecial "CTRL-PageUp"
|
syn match helpSpecial "CTRL-PageUp"
|
||||||
syn match helpSpecial "CTRL-PageDown"
|
syn match helpSpecial "CTRL-PageDown"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -58,7 +58,7 @@ syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=
|
|||||||
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial extend
|
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial extend
|
||||||
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial extend
|
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial extend
|
||||||
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
|
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
|
||||||
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\%(\x\|_\)\+\)\>/
|
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\%(\x\|_\)\+\)n\=\>/
|
||||||
syntax keyword jsNumber Infinity
|
syntax keyword jsNumber Infinity
|
||||||
syntax match jsFloat /\c\<\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%(e[+-]\=\d\+\)\=\>/
|
syntax match jsFloat /\c\<\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%(e[+-]\=\d\+\)\=\>/
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ syntax keyword jsAsyncKeyword async await
|
|||||||
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
|
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
|
||||||
|
|
||||||
" Keywords
|
" Keywords
|
||||||
syntax keyword jsGlobalObjects ArrayBuffer Array BigInt64Array BigUint64Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Boolean Buffer Collator DataView Date DateTimeFormat Function Intl Iterator JSON Map Set WeakMap WeakSet Math Number NumberFormat Object ParallelArray Promise Proxy Reflect RegExp String Symbol Uint8ClampedArray WebAssembly console document fetch window
|
syntax keyword jsGlobalObjects ArrayBuffer Array BigInt BigInt64Array BigUint64Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Boolean Buffer Collator DataView Date DateTimeFormat Function Intl Iterator JSON Map Set WeakMap WeakRef WeakSet Math Number NumberFormat Object ParallelArray Promise Proxy Reflect RegExp String Symbol Uint8ClampedArray WebAssembly console document fetch window
|
||||||
syntax keyword jsGlobalNodeObjects module exports global process __dirname __filename
|
syntax keyword jsGlobalNodeObjects module exports global process __dirname __filename
|
||||||
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
|
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
|
||||||
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
||||||
|
|||||||
198
syntax/julia.vim
198
syntax/julia.vim
@@ -33,49 +33,57 @@ let s:julia_spellcheck_comments = get(g:, "julia_spellcheck_comments", 1)
|
|||||||
|
|
||||||
let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
|
let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
|
||||||
|
|
||||||
" characters which cannot be used in identifiers. This list is very incomplete:
|
" List of characters, up to \UFF, which cannot be used in identifiers.
|
||||||
" 1) it only cares about charactes below 256
|
" (It includes operator characters; we don't consider them identifiers.)
|
||||||
" 2) it doesn't distinguish between what's allowed as the 1st char vs in the
|
" This is used mostly in lookbehinds with `\@<=`, e.g. when we need to check
|
||||||
" rest of an identifier (e.g. digits and `!`)
|
" that that we're not in the middle of an identifier.
|
||||||
" Despite these shortcomings, it seems to do a decent job.
|
" It doesn't include a few characters (spaces and all closing parentheses)
|
||||||
" note: \U5B and \U5D are '[' and ']'
|
" because those may or may not be valid in the lookbehind on a case-by-case
|
||||||
let s:nonid_chars = "\U01-\U07" . "\U0E-\U1F" .
|
" basis.
|
||||||
\ "?\"#$'(,.:;=@`\\U5B{" .
|
let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F' .
|
||||||
\ "\U80-\UA1" . "\UA7\UA8\UAB\UAD\UAF\UB4" . "\UB6-\UB8" . "\UBB\UBF"
|
\ '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C' .
|
||||||
|
\ '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
|
||||||
|
|
||||||
let s:nonidS_chars = "[:space:])\\U5D}" . s:nonid_chars
|
" The complete list
|
||||||
|
let s:nonidS_chars = '[:space:])\U5D}' . s:nonid_chars
|
||||||
|
|
||||||
" the following excludes '!' since it can be used as an identifier,
|
|
||||||
" and '$' since it can be used in interpolations
|
|
||||||
" note that \U2D is '-'
|
|
||||||
let s:uniop_chars = "+\\U2D~¬√∛∜⋆"
|
|
||||||
|
|
||||||
let s:binop_chars = "=+\\U2D*/\\%÷^&|⊻<>≤≥≡≠≢∈∉⋅×∪∩⊆⊈⊂⊄⊊←→∋∌⊕⊖⊞⊟∘∧⊗⊘↑↓∨⊠±⟂⋆"
|
" List of all valid operator chars up to \UFF (NOTE: they must all be included
|
||||||
|
" in s:nonidS_chars, so that if we include that, then this is redundant)
|
||||||
|
" It does not include '!' since it can be used in an identifier.
|
||||||
|
" The list contains the following characters: '%&*+-/<=>\\^|~¬±×÷'
|
||||||
|
let s:op_chars = '\U25\U26\U2A\U2B\U2D\U2F\U3C-\U3E\U5C\U5E\U7C\U7E\UAC\UB1\UD7\UF7'
|
||||||
|
|
||||||
" the following is a list of all remainig valid operator chars,
|
" List of all valid operator chars above \UFF
|
||||||
" but it's more efficient when expressed with ranges (see below)
|
" Written with ranges for performance reasons
|
||||||
" let s:binop_chars_extra = "↔↚↛↠↣↦↮⇎⇏⇒⇔⇴⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿⟵⟶⟷⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤌⤍⤎⤏⤐⤑⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥊⥋⥎⥐⥒⥓⥖⥗⥚⥛⥞⥟⥢⥤⥦⥧⥨⥩⥪⥫⥬⥭⥰⧴⬱⬰⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←→" .
|
" The list contains the following characters: '…⁝⅋←↑→↓↔↚↛↜↝↞↠↢↣↤↦↩↪↫↬↮↶↷↺↻↼↽⇀⇁⇄⇆⇇⇉⇋⇌⇍⇎⇏⇐⇒⇔⇚⇛⇜⇝⇠⇢⇴⇵⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿∈∉∊∋∌∍∓∔∗∘∙√∛∜∝∤∥∦∧∨∩∪∷∸∺∻∽∾≀≁≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊂⊃⊄⊅⊆⊇⊈⊉⊊⊋⊍⊎⊏⊐⊑⊒⊓⊔⊕⊖⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡⊢⊣⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⊻⊼⊽⋄⋅⋆⋇⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⌿▷⟂⟈⟉⟑⟒⟕⟖⟗⟰⟱⟵⟶⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤈⤉⤊⤋⤌⤍⤎⤏⤐⤑⤒⤓⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥉⥊⥋⥌⥍⥎⥏⥐⥑⥒⥓⥔⥕⥖⥗⥘⥙⥚⥛⥜⥝⥞⥟⥠⥡⥢⥣⥤⥥⥦⥧⥨⥩⥪⥫⥬⥭⥮⥯⥰⦷⦸⦼⦾⦿⧀⧁⧡⧣⧤⧥⧴⧶⧷⧺⧻⨇⨈⨝⨟⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨰⨱⨲⨳⨴⨵⨶⨷⨸⨹⨺⨻⨼⨽⩀⩁⩂⩃⩄⩅⩊⩋⩌⩍⩎⩏⩐⩑⩒⩓⩔⩕⩖⩗⩘⩚⩛⩜⩝⩞⩟⩠⩡⩢⩣⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫛⫷⫸⫹⫺⬰⬱⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←↑→↓'
|
||||||
" \ "∝∊∍∥∦∷∺∻∽∾≁≃≄≅≆≇≈≉≊≋≌≍≎≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≣≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊃⊅⊇⊉⊋⊏⊐⊑⊒⊜⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⋍⋐⋑⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⟈⟉⟒⦷⧀⧁⧡⧣⧤⧥⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫷⫸⫹⫺⊢⊣" .
|
let s:op_chars_wc = '\U2026\U205D\U214B\U2190-\U2194\U219A-\U219E\U21A0\U21A2-\U21A4\U21A6\U21A9-\U21AC\U21AE\U21B6\U21B7\U21BA-\U21BD\U21C0\U21C1\U21C4\U21C6\U21C7\U21C9\U21CB-\U21D0\U21D2\U21D4\U21DA-\U21DD\U21E0\U21E2\U21F4-\U21FF\U2208-\U220D\U2213\U2214\U2217-\U221D\U2224-\U222A\U2237\U2238\U223A\U223B\U223D\U223E\U2240-\U228B\U228D-\U229C\U229E-\U22A3\U22A9\U22AC\U22AE\U22B0-\U22B7\U22BB-\U22BD\U22C4-\U22C7\U22C9-\U22D3\U22D5-\U22FF\U233F\U25B7\U27C2\U27C8\U27C9\U27D1\U27D2\U27D5-\U27D7\U27F0\U27F1\U27F5-\U27F7\U27F9-\U27FF\U2900-\U2918\U291D-\U2920\U2944-\U2970\U29B7\U29B8\U29BC\U29BE-\U29C1\U29E1\U29E3-\U29E5\U29F4\U29F6\U29F7\U29FA\U29FB\U2A07\U2A08\U2A1D\U2A1F\U2A22-\U2A2E\U2A30-\U2A3D\U2A40-\U2A45\U2A4A-\U2A58\U2A5A-\U2A63\U2A66\U2A67\U2A6A-\U2AD9\U2ADB\U2AF7-\U2AFA\U2B30-\U2B44\U2B47-\U2B4C\UFFE9-\UFFEC'
|
||||||
" \ "⊔∓∔∸≂≏⊎⊽⋎⋓⧺⧻⨈⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨹⨺⩁⩂⩅⩊⩌⩏⩐⩒⩔⩖⩗⩛⩝⩡⩢⩣" .
|
|
||||||
" \ "⊙⊚⊛⊡⊓∗∙∤⅋≀⊼⋄⋇⋉⋊⋋⋌⋏⋒⟑⦸⦼⦾⦿⧶⧷⨇⨰⨱⨲⨳⨴⨵⨶⨷⨸⨻⨼⨽⩀⩃⩄⩋⩍⩎⩑⩓⩕⩘⩚⩜⩞⩟⩠⫛⊍▷⨝⟕⟖⟗" .
|
|
||||||
" \ "⇵⟰⟱⤈⤉⤊⤋⤒⤓⥉⥌⥍⥏⥑⥔⥕⥘⥙⥜⥝⥠⥡⥣⥥⥮⥯↑↓"
|
|
||||||
|
|
||||||
" same as above, but with character ranges, for performance
|
" Full operators regex
|
||||||
let s:binop_chars_extra = "\\U214B\\U2190-\\U2194\\U219A\\U219B\\U21A0\\U21A3\\U21A6\\U21AE\\U21CE\\U21CF\\U21D2\\U21D4\\U21F4-\\U21FF\\U2208-\\U220D\\U2213\\U2214\\U2217-\\U2219\\U221D\\U2224-\\U222A\\U2237\\U2238\\U223A\\U223B\\U223D\\U223E\\U2240-\\U228B\\U228D-\\U229C\\U229E-\\U22A3\\U22A9\\U22AC\\U22AE\\U22B0-\\U22B7\\U22BB-\\U22BD\\U22C4-\\U22C7\\U22C9-\\U22D3\\U22D5-\\U22ED\\U22F2-\\U22FF\\U25B7\\U27C8\\U27C9\\U27D1\\U27D2\\U27D5-\\U27D7\\U27F0\\U27F1\\U27F5-\\U27F7\\U27F7\\U27F9-\\U27FF\\U2900-\\U2918\\U291D-\\U2920\\U2944-\\U2970\\U29B7\\U29B8\\U29BC\\U29BE-\\U29C1\\U29E1\\U29E3-\\U29E5\\U29F4\\U29F6\\U29F7\\U29FA\\U29FB\\U2A07\\U2A08\\U2A1D\\U2A22-\\U2A2E\\U2A30-\\U2A3D\\U2A40-\\U2A45\\U2A4A-\\U2A58\\U2A5A-\\U2A63\\U2A66\\U2A67\\U2A6A-\\U2AD9\\U2ADB\\U2AF7-\\U2AFA\\U2B30-\\U2B44\\U2B47-\\U2B4C\\UFFE9-\\UFFEC"
|
let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?=' .
|
||||||
|
\ '\|' . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?' .
|
||||||
" a Julia identifier, sort of
|
\ '\|' . '\.\?[!' . s:op_chars . s:op_chars_wc . ']' .
|
||||||
let s:idregex = '\%([^' . s:nonidS_chars . '0-9!' . s:uniop_chars . s:binop_chars . '][^' . s:nonidS_chars . s:uniop_chars . s:binop_chars . s:binop_chars_extra . ']*\)'
|
|
||||||
|
|
||||||
let s:operators = '\%(' . '\.\%([-+*/^÷%|&!]\|//\|\\\|<<\|>>>\?\)\?=' .
|
|
||||||
\ '\|' . '[:$<>]=\|||\|&&\||>\|<|\|<:\|>:\|::\|<<\|>>>\?\|//\|[-=]>\|\.\{3\}' .
|
|
||||||
\ '\|' . '\.\?[' . s:uniop_chars . '!]' .
|
|
||||||
\ '\|' . '\.\?[' . s:binop_chars . s:binop_chars_extra . ']' .
|
|
||||||
\ '\)'
|
\ '\)'
|
||||||
|
|
||||||
|
|
||||||
|
" Characters that can be used to start an identifier. Above \UBF we don't
|
||||||
|
" bother checking. (If a UTF8 operator is used, it will take precedence anyway.)
|
||||||
|
let s:id_charsH = '\%([A-Za-z_\UA2-\UA6\UA9\UAA\UAE\UB0\UB5\UBA]\|[^\U00-\UBF]\)'
|
||||||
|
" Characters that can appear in an identifier, starting in 2nd position. Above
|
||||||
|
" \UBF we check for operators since we need to stop the identifier if one
|
||||||
|
" appears. We don't check for invalid characters though.
|
||||||
|
let s:id_charsW = '\%([0-9A-Za-z_!\UA2-\UA6\UA9\UAA\UAE-\UB0\UB2-\UB5\UB8-\UBA\UBC-\UBE]\|[^\U00-\UBF]\@=[^' . s:op_chars_wc . ']\)'
|
||||||
|
|
||||||
|
" A valid julia identifier, more or less
|
||||||
|
let s:idregex = '\%(' . s:id_charsH . s:id_charsW . '*\)'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems,@juliaSyntaxRegions
|
syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems,@juliaSyntaxRegions
|
||||||
syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
|
syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
|
||||||
|
syntax cluster juliaExprsNodot contains=@juliaParItems,@juliaStringItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaCommentItems,juliaIdSymbol
|
||||||
|
|
||||||
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
|
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
|
||||||
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaWhereKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword
|
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaWhereKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword
|
||||||
@@ -87,13 +95,13 @@ syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaCons
|
|||||||
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
|
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
|
||||||
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
|
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
|
||||||
syntax cluster juliaNumberItems contains=juliaNumbers
|
syntax cluster juliaNumberItems contains=juliaNumbers
|
||||||
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliaStringPrefixed,juliabString,juliasString,juliavString,juliaipString,juliabigString,juliaMIMEString,juliarawString,juliatextString,juliahtmlString,juliaint128String,juliaShellString,juliaDocString,juliaRegEx
|
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliabString,juliasString,juliaShellString,juliaDocString,juliaRegEx
|
||||||
syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
|
syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
|
||||||
syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
|
syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
|
||||||
syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
|
syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
|
||||||
syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally
|
syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally
|
||||||
|
|
||||||
syntax cluster juliaSyntaxRegions contains=juliaParamTypeR,juliaFunctionCallR,juliaTypeOperatorR,juliaWhereR
|
syntax cluster juliaSyntaxRegions contains=juliaIdSymbol,juliaTypeOperatorR2,juliaTypeOperatorR3,juliaWhereR,juliaDotted
|
||||||
|
|
||||||
syntax cluster juliaSpellcheckStrings contains=@spell
|
syntax cluster juliaSpellcheckStrings contains=@spell
|
||||||
syntax cluster juliaSpellcheckDocStrings contains=@spell
|
syntax cluster juliaSpellcheckDocStrings contains=@spell
|
||||||
@@ -113,65 +121,72 @@ syntax match juliaSemicolon display ";"
|
|||||||
syntax match juliaComma display ","
|
syntax match juliaComma display ","
|
||||||
syntax match juliaColon display ":"
|
syntax match juliaColon display ":"
|
||||||
|
|
||||||
" This is really ugly. It would be better to mask most keywords when a dot is
|
" A dot can introduce a sort of 'environment' such that words after it are not
|
||||||
" found, introducing some kind of dot-environment
|
" recognized as keywords. This has low precedence so that it can be overridden
|
||||||
let s:nodot = '\%(\.\)\@'.s:d(1).'<!'
|
" by operators
|
||||||
|
syntax match juliaDotted transparent "\.\s*[^.]" contains=@juliaExprsNodot
|
||||||
|
syntax match juliaDottedT contained transparent "\.\s*[^.]" contains=@juliaExprsNodot,juliaType
|
||||||
|
|
||||||
syntax match juliaErrorPar display "[])}]"
|
syntax match juliaErrorPar display "[])}]"
|
||||||
exec 'syntax match juliaErrorEnd display "'.s:nodot.'\<end\>"'
|
syntax match juliaErrorEnd display "\<end\>"
|
||||||
exec 'syntax match juliaErrorElse display "'.s:nodot.'\<\%(else\|elseif\)\>"'
|
syntax match juliaErrorElse display "\<\%(else\|elseif\)\>"
|
||||||
exec 'syntax match juliaErrorCatch display "'.s:nodot.'\<catch\>"'
|
syntax match juliaErrorCatch display "\<catch\>"
|
||||||
exec 'syntax match juliaErrorFinally display "'.s:nodot.'\<finally\>"'
|
syntax match juliaErrorFinally display "\<finally\>"
|
||||||
syntax match juliaErrorSemicol display contained ";"
|
syntax match juliaErrorSemicol display contained ";"
|
||||||
|
|
||||||
syntax region juliaParBlock matchgroup=juliaParDelim start="(" end=")" contains=@juliaExpressions,juliaComprehensionFor
|
syntax region juliaParBlock matchgroup=juliaParDelim start="(" end=")" contains=@juliaExpressions,juliaComprehensionFor
|
||||||
syntax region juliaParBlockInRange matchgroup=juliaParDelim contained start="(" end=")" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor
|
syntax region juliaParBlockInRange matchgroup=juliaParDelim contained start="(" end=")" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor
|
||||||
syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
|
syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
|
||||||
exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
||||||
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=juliaType,@juliaExpressions
|
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=juliaType,juliaDottedT,@juliaExpressions
|
||||||
|
|
||||||
exec 'syntax match juliaType contained "' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
exec 'syntax match juliaType contained "\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
||||||
|
|
||||||
exec 'syntax region juliaFunctionCallR transparent start="' . s:idregex . '\%(\.' . s:idregex . '\)*\.\?(" end=")\@'.s:d(1).'<=" contains=juliaFunctionCall,juliaParBlock'
|
" This is a generic identifier followed by some symbol, either a type
|
||||||
exec 'syntax match juliaFunctionCall contained "\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
" operator (<: or >:), or an open parenthesis, or an open curly bracket.
|
||||||
|
" It's used to recognize one of the contained regions looking for identifiers
|
||||||
|
" only once. Once recognized, those regions no longer need to use the
|
||||||
|
" expensive s:idregex.
|
||||||
|
exec 'syntax match juliaIdSymbol transparent "' . s:idregex . '\%(\s*[<>]:\|\.\?(\|{\|\"\)\@=" contains=juliaFunctionCall,juliaParamType,juliaStringPrefixed,juliaTypeOperatorR1'
|
||||||
|
|
||||||
|
syntax match juliaFunctionCall contained "[^{([:space:]<>\"]\+(\@=" nextgroup=juliaParBlock
|
||||||
|
|
||||||
" note: we would in principle add a "s:nodot" before function/macro/struct/... but it shouldn't come up in valid code
|
|
||||||
exec 'syntax match juliaFunctionDef contained transparent "\%(\<\%(function\|macro\)\)\@'.s:d(8).'<=\s\+\zs' . s:idregex . '\%(\.' . s:idregex . '\)*\ze\s*\%((\|\send\>\|$\)" contains=juliaFunctionName'
|
exec 'syntax match juliaFunctionDef contained transparent "\%(\<\%(function\|macro\)\)\@'.s:d(8).'<=\s\+\zs' . s:idregex . '\%(\.' . s:idregex . '\)*\ze\s*\%((\|\send\>\|$\)" contains=juliaFunctionName'
|
||||||
exec 'syntax match juliaFunctionName contained "\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
exec 'syntax match juliaFunctionName contained "\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
|
||||||
|
|
||||||
exec 'syntax match juliaStructR contained transparent "\%(\<\%(\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*' . s:idregex . '\>\(\s*(\)\@!" contains=juliaType'
|
exec 'syntax match juliaStructR contained transparent "\%(\<\%(\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*' . s:idregex . '\>\(\s*(\)\@!" contains=juliaType'
|
||||||
|
|
||||||
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|const\)\>"'
|
syntax match juliaKeyword display "\<\%(return\|local\|global\|const\)\>"
|
||||||
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
|
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
|
||||||
|
|
||||||
" The import/export/using keywords introduce a sort of special parsing
|
" The import/export/using keywords introduce a sort of special parsing
|
||||||
" environment with its own rules
|
" environment with its own rules
|
||||||
exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="'.s:nodot.'\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
|
exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
|
||||||
syntax match juliaAsKeyword display contained "\<as\>"
|
syntax match juliaAsKeyword display contained "\<as\>"
|
||||||
|
|
||||||
exec 'syntax match juliaRepKeyword display "'.s:nodot.'\<\%(break\|continue\)\>"'
|
syntax match juliaRepKeyword display "\<\%(break\|continue\)\>"
|
||||||
exec 'syntax region juliaConditionalBlock matchgroup=juliaConditional start="'.s:nodot.'\<if\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold'
|
syntax region juliaConditionalBlock matchgroup=juliaConditional start="\<if\>" end="\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold
|
||||||
exec 'syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="'.s:nodot.'\<elseif\>" end="'.s:nodot.'\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock'
|
syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="\<elseif\>" end="\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock
|
||||||
exec 'syntax region juliaConditionalEBlock matchgroup=juliaConditional transparent contained start="'.s:nodot.'\<else\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions'
|
syntax region juliaConditionalEBlock matchgroup=juliaConditional transparent contained start="\<else\>" end="\<end\>"me=s-1 contains=@juliaExpressions
|
||||||
exec 'syntax region juliaWhileBlock matchgroup=juliaRepeat start="'.s:nodot.'\<while\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaWhileBlock matchgroup=juliaRepeat start="\<while\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaForBlock matchgroup=juliaRepeat start="'.s:nodot.'\<for\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaOuter fold'
|
syntax region juliaForBlock matchgroup=juliaRepeat start="\<for\>" end="\<end\>" contains=@juliaExpressions,juliaOuter fold
|
||||||
exec 'syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<begin\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="\<begin\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef fold'
|
syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="\<function\>" end="\<end\>" contains=@juliaExpressions,juliaFunctionDef fold
|
||||||
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaFunctionDef fold'
|
syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="\<macro\>" end="\<end\>" contains=@juliaExpressions,juliaFunctionDef fold
|
||||||
exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="\<quote\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaStructR fold'
|
syntax region juliaStructBlock matchgroup=juliaBlKeyword start="\<struct\>" end="\<end\>" contains=@juliaExpressions,juliaStructR fold
|
||||||
exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable\s\+struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaStructR fold'
|
syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="\<mutable\s\+struct\>" end="\<end\>" contains=@juliaExpressions,juliaStructR fold
|
||||||
exec 'syntax region juliaLetBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<let\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaLetBlock matchgroup=juliaBlKeyword start="\<let\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaDoBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<do\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaDoBlock matchgroup=juliaBlKeyword start="\<do\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\%(\%(\.\s*\)\@'.s:d(6).'<!\|\%(@\s*\.\s*\)\@'.s:d(6).'<=\)\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold'
|
syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold
|
||||||
exec 'syntax region juliaExceptionBlock matchgroup=juliaException start="'.s:nodot.'\<try\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold'
|
syntax region juliaExceptionBlock matchgroup=juliaException start="\<try\>" end="\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold
|
||||||
exec 'syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<catch\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock'
|
syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="\<catch\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock
|
||||||
exec 'syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<finally\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions'
|
syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="\<finally\>" end="\<end\>"me=s-1 contains=@juliaExpressions
|
||||||
exec 'syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<abstract\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions,juliaStructR'
|
syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="\<abstract\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
|
||||||
exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<primitive\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions,juliaStructR'
|
syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="\<primitive\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
|
||||||
|
|
||||||
exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
|
exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
|
||||||
exec 'syntax match juliaComprehensionIf contained "'.s:nodot.'\<if\>"'
|
syntax match juliaComprehensionIf contained "\<if\>"
|
||||||
|
|
||||||
exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
|
exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
|
||||||
|
|
||||||
@@ -206,16 +221,16 @@ syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|p
|
|||||||
" (This also tries to detect preceding number constants; it does so in a crude
|
" (This also tries to detect preceding number constants; it does so in a crude
|
||||||
" way.)
|
" way.)
|
||||||
syntax match juliaPossibleEuler "ℯ" contains=juliaEuler
|
syntax match juliaPossibleEuler "ℯ" contains=juliaEuler
|
||||||
exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"'
|
exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . s:op_chars_wc . ']\)\%(.\?[0-9][.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze[' . s:nonidS_chars . s:op_chars_wc . ']"'
|
||||||
syntax match juliaConstBool display "\<\%(true\|false\)\>"
|
syntax match juliaConstBool display "\<\%(true\|false\)\>"
|
||||||
syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|PROGRAM_FILE\|DEPOT_PATH\)\>"
|
syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|PROGRAM_FILE\|DEPOT_PATH\)\>"
|
||||||
syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
|
syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
|
||||||
syntax match juliaConstC display "\<\%(C_NULL\)\>"
|
syntax match juliaConstC display "\<\%(C_NULL\)\>"
|
||||||
syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>"
|
syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>"
|
||||||
|
|
||||||
exec 'syntax region juliaParamTypeR transparent start="' . s:idregex . '{" end="}\@'.s:d(1).'<=" contains=juliaType,@juliaExpressions'
|
syntax match juliaParamType contained "[^{([:space:]<>\"]\+\ze{" nextgroup=juliaCurBraBlock
|
||||||
|
|
||||||
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro,juliaDocMacro
|
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro,juliaDocMacro,juliaDocMacroPre
|
||||||
|
|
||||||
exec 'syntax match juliaMacro contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
exec 'syntax match juliaMacro contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||||
syntax match juliaMacro contained "@[!.~$%^*/\\|<>+-]\ze[^0-9]"
|
syntax match juliaMacro contained "@[!.~$%^*/\\|<>+-]\ze[^0-9]"
|
||||||
@@ -224,7 +239,7 @@ exec 'syntax region juliaMacroCall contained transparent start="\(@.\)\@=\1\%([
|
|||||||
exec 'syntax region juliaMacroCallP contained transparent start="@' . s:idregex . '\%(\.' . s:idregex . '\)*(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
exec 'syntax region juliaMacroCallP contained transparent start="@' . s:idregex . '\%(\.' . s:idregex . '\)*(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
||||||
exec 'syntax region juliaMacroCallP contained transparent start="@.(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
exec 'syntax region juliaMacroCallP contained transparent start="@.(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
|
||||||
|
|
||||||
syntax match juliaNumbers transparent "\<\d\|\.\d\|\<im\>" contains=juliaNumber,juliaFloat,juliaComplexUnit
|
exec 'syntax match juliaNumbers transparent "\%(^\|[' . s:nonidS_chars . s:op_chars_wc . ']\)\@'.s:d(1).'<=\d\|\.\d\|im\>" contains=juliaNumber,juliaFloat,juliaComplexUnit'
|
||||||
|
|
||||||
"integer regexes
|
"integer regexes
|
||||||
let s:dec_regex = '\d\%(_\?\d\)*\%(\>\|im\>\|\ze\D\)'
|
let s:dec_regex = '\d\%(_\?\d\)*\%(\>\|im\>\|\ze\D\)'
|
||||||
@@ -265,9 +280,10 @@ syntax match juliaComplexUnit display contained "\<im\>"
|
|||||||
|
|
||||||
syntax match juliaRangeOperator display ":"
|
syntax match juliaRangeOperator display ":"
|
||||||
exec 'syntax match juliaOperator "' . s:operators . '"'
|
exec 'syntax match juliaOperator "' . s:operators . '"'
|
||||||
|
|
||||||
exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
|
exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
|
||||||
|
|
||||||
let s:interp_dollar = '\([' . s:nonidS_chars . s:uniop_chars . s:binop_chars . '!]\|^\)\@'.s:d(1).'<=\$'
|
let s:interp_dollar = '\([' . s:nonidS_chars . s:op_chars_wc . '!]\|^\)\@'.s:d(1).'<=\$'
|
||||||
|
|
||||||
exec 'syntax match juliaDollarVar display contained "' . s:interp_dollar . s:idregex . '"'
|
exec 'syntax match juliaDollarVar display contained "' . s:interp_dollar . s:idregex . '"'
|
||||||
exec 'syntax region juliaDollarPar matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '(" end=")" contains=@juliaExpressions'
|
exec 'syntax region juliaDollarPar matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '(" end=")" contains=@juliaExpressions'
|
||||||
@@ -279,22 +295,14 @@ syntax match juliaChar display "'\\x\x\{2\}'" contains=juliaHexEscapeChar
|
|||||||
syntax match juliaChar display "'\\u\x\{1,4\}'" contains=juliaUniCharSmall
|
syntax match juliaChar display "'\\u\x\{1,4\}'" contains=juliaUniCharSmall
|
||||||
syntax match juliaChar display "'\\U\x\{1,8\}'" contains=juliaUniCharLarge
|
syntax match juliaChar display "'\\U\x\{1,8\}'" contains=juliaUniCharLarge
|
||||||
|
|
||||||
exec 'syntax match juliaCTransOperator "[[:space:]}' . s:nonid_chars . s:uniop_chars . s:binop_chars . '!]\@'.s:d(1).'<!\.\?' . "'" . 'ᵀ\?"'
|
exec 'syntax match juliaCTransOperator "[[:space:]}' . s:nonid_chars . s:op_chars_wc . '!]\@'.s:d(1).'<!\.\?' . "'" . 'ᵀ\?"'
|
||||||
|
|
||||||
" TODO: some of these might be specialized; the rest could be just left to the
|
" TODO: some of these might be specialized; the rest could be just left to the
|
||||||
" generic juliaStringPrefixed fallback
|
" generic juliaStringPrefixed fallback
|
||||||
syntax region juliaString matchgroup=juliaStringDelim start=+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckStrings
|
syntax region juliaString matchgroup=juliaStringDelim start=+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckStrings
|
||||||
exec 'syntax region juliaStringPrefixed matchgroup=juliaStringDelim start=+\<' . s:idregex . '\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw'
|
syntax region juliaStringPrefixed contained matchgroup=juliaStringDelim start=+[^{([:space:]<>"]\+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
||||||
syntax region juliabString matchgroup=juliaStringDelim start=+\<b\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
syntax region juliabString matchgroup=juliaStringDelim start=+\<b\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
||||||
syntax region juliasString matchgroup=juliaStringDelim start=+\<s\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
syntax region juliasString matchgroup=juliaStringDelim start=+\<s\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
||||||
syntax region juliavString matchgroup=juliaStringDelim start=+\<v\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliaipString matchgroup=juliaStringDelim start=+\<ip\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliabigString matchgroup=juliaStringDelim start=+\<big\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliaMIMEString matchgroup=juliaStringDelim start=+\<MIME\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
|
|
||||||
syntax region juliarawString matchgroup=juliaStringDelim start=+\<raw\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliatextString matchgroup=juliaStringDelim start=+\<text\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
|
||||||
|
|
||||||
syntax region juliaDocString matchgroup=juliaDocStringDelim fold start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
syntax region juliaDocString matchgroup=juliaDocStringDelim fold start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||||
|
|
||||||
@@ -303,7 +311,9 @@ syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" en
|
|||||||
syntax region juliaPrintfParBlock contained matchgroup=juliaParDelim start="(" end=")" contains=@juliaExprsPrintf
|
syntax region juliaPrintfParBlock contained matchgroup=juliaParDelim start="(" end=")" contains=@juliaExprsPrintf
|
||||||
syntax region juliaPrintfString contained matchgroup=juliaStringDelim start=+"+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=@juliaSpecialChars,@juliaPrintfChars
|
syntax region juliaPrintfString contained matchgroup=juliaStringDelim start=+"+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=@juliaSpecialChars,@juliaPrintfChars
|
||||||
|
|
||||||
exec 'syntax region juliaDocMacro contained transparent start=+@doc\s\+\%(' . s:idregex . '\%(\.' . s:idregex . '\)*\)\?\z("\%(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\(\z1\)\@'.s:d(3).'<=+ contains=juliaMacro,juliaDocStringM'
|
exec 'syntax region juliaDocMacroPre contained transparent start=+@doc\s\+\%(' . s:idregex . '\%(\.' . s:idregex . '\)*\)\z("\%(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\(\z1\)\@'.s:d(3).'<=+ contains=juliaMacro,juliaDocStringMRaw'
|
||||||
|
exec 'syntax region juliaDocMacro contained transparent start=+@doc\s\+\z("\%(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\(\z1\)\@'.s:d(3).'<=+ contains=juliaMacro,juliaDocStringM'
|
||||||
|
syntax region juliaDocStringMRaw contained fold matchgroup=juliaDocStringDelim fold start=+\z\("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpellcheckDocStrings
|
||||||
syntax region juliaDocStringM contained fold matchgroup=juliaDocStringDelim fold start=+\z\("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
syntax region juliaDocStringM contained fold matchgroup=juliaDocStringDelim fold start=+\z\("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||||
|
|
||||||
syntax region juliaShellString matchgroup=juliaStringDelim start=+`+ skip=+\%(\\\\\)*\\`+ end=+`+ contains=@juliaStringVars,juliaSpecialChar
|
syntax region juliaShellString matchgroup=juliaStringDelim start=+`+ skip=+\%(\\\\\)*\\`+ end=+`+ contains=@juliaStringVars,juliaSpecialChar
|
||||||
@@ -338,8 +348,8 @@ syntax match juliaPrintfFmt display contained "\\%%"hs=s+1
|
|||||||
" (for performance reasons)
|
" (for performance reasons)
|
||||||
syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
|
syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
|
||||||
|
|
||||||
let s:quotable = '\%(' . s:idregex . '\|?\|' . s:operators . '\|' . s:float_regex . '\|' . s:int_regex . '\)'
|
let s:quotable = '\%(' . s:idregex . '\|' . s:operators . '\|[?.]\|' . s:float_regex . '\|' . s:int_regex . '\)'
|
||||||
let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:uniop_chars . s:binop_chars . ']\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s\+\)\@'.s:d(9).'<=\)\zs:'
|
let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:op_chars_wc . ']\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s\+\)\@'.s:d(9).'<=\)\zs:'
|
||||||
let s:quoting_colonS = '\s\@'.s:d(1).'<=:'
|
let s:quoting_colonS = '\s\@'.s:d(1).'<=:'
|
||||||
|
|
||||||
" note: juliaSymbolS only works within whitespace-sensitive contexts,
|
" note: juliaSymbolS only works within whitespace-sensitive contexts,
|
||||||
@@ -358,15 +368,16 @@ exec 'syntax match juliaQuotedQMarkPar "' . s:quoting_colon . '(\s*?\s*)" con
|
|||||||
exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions'
|
exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions'
|
||||||
|
|
||||||
|
|
||||||
|
syntax match juliaTypeOperatorR1 contained "[^{([:space:]<>\"]\+\%(\s*[<>]:\)\@="
|
||||||
|
|
||||||
" force precedence over Symbols
|
" force precedence over Symbols
|
||||||
exec 'syntax match juliaTypeOperatorR transparent "[<>:]:\s*\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaTypeOperator,juliaType,@juliaExpressions'
|
syntax match juliaTypeOperator contained "[<>:]:"
|
||||||
exec 'syntax match juliaTypeOperatorR transparent "' . s:idregex . '\%(\.' . s:idregex . '\)*\s*[<>]:\s*\%(\%(' . s:idregex . '\.\)*' . s:idregex . '\)\?" contains=juliaTypeOperator,juliaType,@juliaExpressions'
|
exec 'syntax match juliaTypeOperatorR2 transparent "[<>:]:\s*\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaTypeOperator,juliaType,juliaDottedT,@juliaExpressions nextgroup=juliaTypeOperator'
|
||||||
exec 'syntax match juliaTypeOperatorR transparent "\<isa\s\+\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaIsaKeyword,juliaType,@juliaExpressions'
|
|
||||||
syntax match juliaTypeOperator contained "[:<>]:"
|
|
||||||
syntax match juliaIsaKeyword contained "\<isa\>"
|
syntax match juliaIsaKeyword contained "\<isa\>"
|
||||||
|
exec 'syntax match juliaTypeOperatorR3 transparent "\<isa\s\+\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaIsaKeyword,juliaType,juliaDottedT,@juliaExpressions nextgroup=juliaIsaKeyword'
|
||||||
|
|
||||||
syntax match juliaWhereKeyword "\<where\>"
|
syntax match juliaWhereKeyword "\<where\>"
|
||||||
exec 'syntax match juliaWhereR transparent "\<where\s\+' . s:idregex . '" contains=juliaWhereKeyword,juliaType,juliaTypeOperatorR'
|
exec 'syntax match juliaWhereR transparent "\<where\s\+' . s:idregex . '" contains=juliaWhereKeyword,juliaType,juliaDottedT,juliaIdSymbol'
|
||||||
|
|
||||||
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,@juliaSpellcheckComments
|
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,@juliaSpellcheckComments
|
||||||
syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||||
@@ -433,6 +444,8 @@ hi def link juliaBaseTypeTime Type
|
|||||||
hi def link juliaBaseTypeOther Type
|
hi def link juliaBaseTypeOther Type
|
||||||
|
|
||||||
hi def link juliaType Type
|
hi def link juliaType Type
|
||||||
|
hi def link juliaParamType Type
|
||||||
|
hi def link juliaTypeOperatorR1 Type
|
||||||
|
|
||||||
" NOTE: deprecated constants are not highlighted as such. For once,
|
" NOTE: deprecated constants are not highlighted as such. For once,
|
||||||
" one can still legitimately use them by importing Base.MathConstants.
|
" one can still legitimately use them by importing Base.MathConstants.
|
||||||
@@ -485,6 +498,7 @@ hi def link juliaPrintfString juliaString
|
|||||||
hi def link juliaShellString juliaString
|
hi def link juliaShellString juliaString
|
||||||
hi def link juliaDocString juliaString
|
hi def link juliaDocString juliaString
|
||||||
hi def link juliaDocStringM juliaDocString
|
hi def link juliaDocStringM juliaDocString
|
||||||
|
hi def link juliaDocStringMRaw juliaDocString
|
||||||
hi def link juliaStringDelim juliaString
|
hi def link juliaStringDelim juliaString
|
||||||
hi def link juliaDocStringDelim juliaDocString
|
hi def link juliaDocStringDelim juliaDocString
|
||||||
hi def link juliaStringVarsPla Identifier
|
hi def link juliaStringVarsPla Identifier
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Kotlin
|
" Language: Kotlin
|
||||||
" Maintainer: Alexander Udalov
|
" Maintainer: Alexander Udalov
|
||||||
" Latest Revision: 11 April 2021
|
" Latest Revision: 20 April 2021
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
@@ -47,7 +47,7 @@ syn keyword ktType Synchronized Target TestTimeSource ThreadLocal Throwable Thro
|
|||||||
syn keyword ktType UByteIterator UInt UIntArray UIntIterator UIntProgression UIntRange ULong ULongArray ULongIterator ULongProgression ULongRange UShort UShortArray UShortIterator
|
syn keyword ktType UByteIterator UInt UIntArray UIntIterator UIntProgression UIntRange ULong ULongArray ULongIterator ULongProgression ULongRange UShort UShortArray UShortIterator
|
||||||
syn keyword ktType UninitializedPropertyAccessException Unit UnsafeVariance UnsupportedOperationException UseExperimental Volatile
|
syn keyword ktType UninitializedPropertyAccessException Unit UnsafeVariance UnsupportedOperationException UseExperimental Volatile
|
||||||
|
|
||||||
syn keyword ktModifier annotation companion enum inner abstract final open override sealed vararg dynamic expect actual
|
syn keyword ktModifier annotation companion enum inner abstract final open override sealed vararg dynamic expect actual suspend
|
||||||
syn keyword ktStructure class object interface typealias fun val var constructor init
|
syn keyword ktStructure class object interface typealias fun val var constructor init
|
||||||
|
|
||||||
syn keyword ktReservedKeyword typeof
|
syn keyword ktReservedKeyword typeof
|
||||||
@@ -58,10 +58,10 @@ syn keyword ktConstant null
|
|||||||
syn keyword ktModifier reified external inline noinline crossinline
|
syn keyword ktModifier reified external inline noinline crossinline
|
||||||
|
|
||||||
syn match ktModifier "\v<(data|value)>\ze\@=.*<class>"
|
syn match ktModifier "\v<(data|value)>\ze\@=.*<class>"
|
||||||
syn match ktModifier "\v<(tailrec|operator|infix|suspend)>\ze\@=.*<fun>"
|
syn match ktModifier "\v<(tailrec|operator|infix)>\ze\@=.*<fun>"
|
||||||
syn match ktModifier "\v<(const)>\ze\@=.*<val>"
|
syn match ktModifier "\v<(const)>\ze\@=.*<val>"
|
||||||
syn match ktModifier "\v<(lateinit)>\ze\@=.*<var>"
|
syn match ktModifier "\v<(lateinit)>\ze\@=.*<var>"
|
||||||
syn match ktModifier "\v<(internal|private|protected|public)>\ze\@=.*<(class|object|fun|val|var|typealias|constructor)>"
|
syn match ktModifier "\v<(internal|private|protected|public)>\ze\@=.*<(class|object|interface|typealias|fun|val|var|constructor|get|set)>"
|
||||||
|
|
||||||
syn match ktOperator "\v\?:|::|\<\=? | \>\=?|[!=]\=\=?|<as>\??|[-!%&*+/|]"
|
syn match ktOperator "\v\?:|::|\<\=? | \>\=?|[!=]\=\=?|<as>\??|[-!%&*+/|]"
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ syn keyword llvmKeyword
|
|||||||
\ available_externally
|
\ available_externally
|
||||||
\ blockaddress
|
\ blockaddress
|
||||||
\ builtin
|
\ builtin
|
||||||
|
\ byref
|
||||||
\ byval
|
\ byval
|
||||||
\ c
|
\ c
|
||||||
\ catch
|
\ catch
|
||||||
@@ -110,6 +111,7 @@ syn keyword llvmKeyword
|
|||||||
\ module
|
\ module
|
||||||
\ monotonic
|
\ monotonic
|
||||||
\ msp430_intrcc
|
\ msp430_intrcc
|
||||||
|
\ mustprogress
|
||||||
\ musttail
|
\ musttail
|
||||||
\ naked
|
\ naked
|
||||||
\ nest
|
\ nest
|
||||||
@@ -123,6 +125,7 @@ syn keyword llvmKeyword
|
|||||||
\ norecurse
|
\ norecurse
|
||||||
\ noredzone
|
\ noredzone
|
||||||
\ noreturn
|
\ noreturn
|
||||||
|
\ noundef
|
||||||
\ nounwind
|
\ nounwind
|
||||||
\ optnone
|
\ optnone
|
||||||
\ optsize
|
\ optsize
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ endif
|
|||||||
" Language: Meson
|
" Language: Meson
|
||||||
" License: VIM License
|
" License: VIM License
|
||||||
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
||||||
|
" Liam Beguin <liambeguin@gmail.com>
|
||||||
" Last Change: 2016 Dec 7
|
" Last Change: 2016 Dec 7
|
||||||
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
|
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||||
" Neil Schemenauer <nas@meson.ca>
|
" Neil Schemenauer <nas@meson.ca>
|
||||||
|
|||||||
@@ -17,12 +17,17 @@ endif
|
|||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
" Types.
|
" Types.
|
||||||
|
"
|
||||||
syn keyword mlirType index f16 f32 f64
|
syn keyword mlirType index f16 f32 f64
|
||||||
" Integer type.
|
" Signless integer types.
|
||||||
syn match mlirType /\<i\d\+\>/
|
syn match mlirType /\<i\d\+\>/
|
||||||
|
" Unsigned integer types.
|
||||||
|
syn match mlirType /\<ui\d\+\>/
|
||||||
|
" Signed integer types.
|
||||||
|
syn match mlirType /\<si\d\+\>/
|
||||||
|
|
||||||
" Elemental types inside memref, tensor, or vector types.
|
" Elemental types inside memref, tensor, or vector types.
|
||||||
syn match mlirType /x\s*\zs\(f16\|f32\|f64\|i\d\+\)/
|
syn match mlirType /x\s*\zs\(f16\|f32\|f64\|i\d\+\|ui\d\+\|si\d\+\)/
|
||||||
|
|
||||||
" Shaped types.
|
" Shaped types.
|
||||||
syn match mlirType /\<memref\ze\s*<.*>/
|
syn match mlirType /\<memref\ze\s*<.*>/
|
||||||
@@ -33,13 +38,14 @@ syn match mlirType /\<vector\ze\s*<.*>/
|
|||||||
syn match mlirType /x\s*\zsvector/
|
syn match mlirType /x\s*\zsvector/
|
||||||
|
|
||||||
" Operations.
|
" Operations.
|
||||||
" Core ops (not exhaustive yet).
|
" Standard dialect ops.
|
||||||
" TODO: the list is not exhaustive.
|
" TODO: this list is not exhaustive.
|
||||||
syn keyword mlirOps alloc alloca addf addi call call_indirect cmpf cmpi constant
|
syn keyword mlirOps alloc alloca addf addi and call call_indirect cmpf cmpi
|
||||||
syn keyword mlirOps dealloc divf dma_start dma_wait dim extract_element
|
syn keyword mlirOps constant dealloc divf dma_start dma_wait dim exp
|
||||||
syn keyword mlirOps getTensor index_cast load memref_cast memref_shape_cast
|
syn keyword mlirOps getTensor index_cast load log memref_cast
|
||||||
syn keyword mlirOps mulf muli negf prefetch sitofp splat store select subf subi
|
syn keyword mlirOps memref_shape_cast mulf muli negf powf prefetch rsqrt sitofp
|
||||||
syn keyword mlirOps subview tensor_cast view
|
syn keyword mlirOps splat store select sqrt subf subi subview tanh
|
||||||
|
syn keyword mlirOps view
|
||||||
|
|
||||||
" Affine ops.
|
" Affine ops.
|
||||||
syn match mlirOps /\<affine\.apply\>/
|
syn match mlirOps /\<affine\.apply\>/
|
||||||
@@ -48,6 +54,7 @@ syn match mlirOps /\<affine\.dma_wait\>/
|
|||||||
syn match mlirOps /\<affine\.for\>/
|
syn match mlirOps /\<affine\.for\>/
|
||||||
syn match mlirOps /\<affine\.if\>/
|
syn match mlirOps /\<affine\.if\>/
|
||||||
syn match mlirOps /\<affine\.load\>/
|
syn match mlirOps /\<affine\.load\>/
|
||||||
|
syn match mlirOps /\<affine\.parallel\>/
|
||||||
syn match mlirOps /\<affine\.prefetch\>/
|
syn match mlirOps /\<affine\.prefetch\>/
|
||||||
syn match mlirOps /\<affine\.store\>/
|
syn match mlirOps /\<affine\.store\>/
|
||||||
syn match mlirOps /\<loop\.for\>/
|
syn match mlirOps /\<loop\.for\>/
|
||||||
|
|||||||
@@ -3,61 +3,98 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula3', 'syntax/modula3.vim
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Modula-3
|
" Language: Modula-3
|
||||||
" Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2001 May 10
|
" Previous Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
|
||||||
|
" Last Change: 2021 Apr 08
|
||||||
|
|
||||||
" Basic things only...
|
|
||||||
" Based on the modula 2 syntax file
|
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Modula-3 is case-sensitive
|
|
||||||
" syn case ignore
|
|
||||||
|
|
||||||
" Modula-3 keywords
|
" Modula-3 keywords
|
||||||
syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY
|
syn keyword modula3Keyword ANY ARRAY AS BITS BRANDED BY CASE CONST DEFINITION
|
||||||
syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE
|
syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION EXIT EXPORTS FINALLY
|
||||||
syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION
|
syn keyword modula3Keyword FROM GENERIC IMPORT LOCK METHOD OF RAISE RAISES
|
||||||
syn keyword modula3Keyword DISPOSE DIV
|
syn keyword modula3Keyword READONLY RECORD REF RETURN SET TRY TYPE TYPECASE
|
||||||
syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION
|
syn keyword modula3Keyword UNSAFE VALUE VAR WITH
|
||||||
syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT
|
|
||||||
syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT
|
syn match modula3keyword "\<UNTRACED\>"
|
||||||
syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK
|
|
||||||
syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX
|
|
||||||
syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE
|
|
||||||
syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY
|
|
||||||
syn keyword modula3Keyword RETURN ROOT
|
|
||||||
syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE
|
|
||||||
syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH
|
|
||||||
|
|
||||||
" Special keywords, block delimiters etc
|
" Special keywords, block delimiters etc
|
||||||
syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
|
syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
|
||||||
syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
|
syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
|
||||||
syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
|
syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
|
||||||
|
|
||||||
" Comments
|
" Reserved identifiers
|
||||||
syn region modula3Comment start="(\*" end="\*)"
|
syn keyword modula3Identifier ABS ADR ADRSIZE BITSIZE BYTESIZE CEILING DEC
|
||||||
|
syn keyword modula3Identifier DISPOSE FIRST FLOAT FLOOR INC ISTYPE LAST
|
||||||
|
syn keyword modula3Identifier LOOPHOLE MAX MIN NARROW NEW NUMBER ORD ROUND
|
||||||
|
syn keyword modula3Identifier SUBARRAY TRUNC TYPECODE VAL
|
||||||
|
|
||||||
|
" Predefined types
|
||||||
|
syn keyword modula3Type ADDRESS BOOLEAN CARDINAL CHAR EXTENDED INTEGER
|
||||||
|
syn keyword modula3Type LONGCARD LONGINT LONGREAL MUTEX NULL REAL REFANY TEXT
|
||||||
|
syn keyword modula3Type WIDECHAR
|
||||||
|
|
||||||
|
syn match modula3Type "\<\%(UNTRACED\s\+\)\=ROOT\>"
|
||||||
|
|
||||||
|
" Operators
|
||||||
|
syn keyword modulaOperator DIV MOD IN AND OR NOT
|
||||||
|
|
||||||
|
if exists("modula3_operators")
|
||||||
|
syn match modula3Operator "\^"
|
||||||
|
syn match modula3Operator "+\|-\|\*\|/\|&"
|
||||||
|
" TODO: need to exclude = in procedure definitions
|
||||||
|
syn match modula3Operator "<=\|<\|>=\|>\|:\@<!=\|#"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Booleans
|
||||||
|
syn keyword modula3Boolean TRUE FALSE
|
||||||
|
|
||||||
|
" Nil
|
||||||
|
syn keyword modula3Nil NIL
|
||||||
|
|
||||||
|
" Integers
|
||||||
|
syn match modula3Integer "\<\d\+L\=\>"
|
||||||
|
syn match modula3Integer "\<\d\d\=_\x\+L\=\>"
|
||||||
|
|
||||||
|
" Reals
|
||||||
|
syn match modula3Real "\c\<\d\+\.\d\+\%([EDX][+-]\=\d\+\)\=\>"
|
||||||
|
|
||||||
|
" String escape sequences
|
||||||
|
syn match modula3Escape "\\['"ntrf]" contained display
|
||||||
|
syn match modula3Escape "\\\o\{3}" contained display
|
||||||
|
syn match modula3Escape "\\\\" contained display
|
||||||
|
|
||||||
|
" Characters
|
||||||
|
syn match modula3Character "'\%([^']\|\\.\|\\\o\{3}\)'" contains=modula3Escape
|
||||||
|
|
||||||
" Strings
|
" Strings
|
||||||
syn region modula3String start=+"+ end=+"+
|
syn region modula3String start=+"+ end=+"+ contains=modula3Escape
|
||||||
syn region modula3String start=+'+ end=+'+
|
|
||||||
|
|
||||||
" Define the default highlighting.
|
" Pragmas
|
||||||
" Only when an item doesn't have highlighting yet
|
syn region modula3Pragma start="<\*" end="\*>"
|
||||||
|
|
||||||
" The default methods for highlighting. Can be overridden later
|
" Comments
|
||||||
hi def link modula3Keyword Statement
|
syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell
|
||||||
hi def link modula3Block PreProc
|
|
||||||
|
" Default highlighting
|
||||||
|
hi def link modula3Block Statement
|
||||||
|
hi def link modula3Boolean Boolean
|
||||||
|
hi def link modula3Character Character
|
||||||
hi def link modula3Comment Comment
|
hi def link modula3Comment Comment
|
||||||
hi def link modula3String String
|
hi def link modula3Escape Special
|
||||||
|
hi def link modula3Identifier Keyword
|
||||||
|
hi def link modula3Integer Number
|
||||||
|
hi def link modula3Keyword Statement
|
||||||
|
hi def link modula3Nil Constant
|
||||||
|
hi def link modula3Operator Operator
|
||||||
|
hi def link modula3Pragma PreProc
|
||||||
|
hi def link modula3Real Float
|
||||||
|
hi def link modula3String String
|
||||||
|
hi def link modula3Type Type
|
||||||
|
|
||||||
let b:current_syntax = "modula3"
|
let b:current_syntax = "modula3"
|
||||||
|
|
||||||
"I prefer to use this...
|
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||||
"set ai
|
|
||||||
"vim: ts=8
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ syn region nixWithExpr matchgroup=nixWithExprKeyword start="\<with\>" matchgroup
|
|||||||
|
|
||||||
syn region nixAssertExpr matchgroup=nixAssertKeyword start="\<assert\>" matchgroup=NONE end=";" contains=@nixExpr
|
syn region nixAssertExpr matchgroup=nixAssertKeyword start="\<assert\>" matchgroup=NONE end=";" contains=@nixExpr
|
||||||
|
|
||||||
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr,nixInterpolation
|
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixArgOperator,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr,nixInterpolation
|
||||||
|
|
||||||
" These definitions override @nixExpr and have to come afterwards:
|
" These definitions override @nixExpr and have to come afterwards:
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,18 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'pascal', 'syntax/pascal.vim')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Pascal
|
" Language: Pascal
|
||||||
" Version: 2.8
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2004/10/17 17:47:30
|
" Previous Maintainers: Xavier Crégut <xavier.cregut@enseeiht.fr>
|
||||||
" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
|
" Mario Eusebio <bio@dq.fct.unl.pt>
|
||||||
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
|
" Last Change: 2021 Apr 23
|
||||||
|
|
||||||
" Contributors: Tim Chase <tchase@csc.com>,
|
" Contributors: Tim Chase <tchase@csc.com>,
|
||||||
" Stas Grabois <stsi@vtrails.com>,
|
" Stas Grabois <stsi@vtrails.com>,
|
||||||
" Mazen NEIFER <mazen.neifer.2001@supaero.fr>,
|
" Mazen NEIFER <mazen.neifer.2001@supaero.fr>,
|
||||||
" Klaus Hast <Klaus.Hast@arcor.net>,
|
" Klaus Hast <Klaus.Hast@arcor.net>,
|
||||||
" Austin Ziegler <austin@halostatue.ca>,
|
" Austin Ziegler <austin@halostatue.ca>,
|
||||||
" Markus Koenig <markus@stber-koenig.de>
|
" Markus Koenig <markus@stber-koenig.de>
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -29,10 +29,10 @@ syn keyword pascalBoolean true false
|
|||||||
syn keyword pascalConditional if else then
|
syn keyword pascalConditional if else then
|
||||||
syn keyword pascalConstant nil maxint
|
syn keyword pascalConstant nil maxint
|
||||||
syn keyword pascalLabel case goto label
|
syn keyword pascalLabel case goto label
|
||||||
syn keyword pascalOperator and div downto in mod not of or packed with
|
syn keyword pascalOperator and div downto in mod not of or packed
|
||||||
syn keyword pascalRepeat do for do repeat while to until
|
syn keyword pascalRepeat do for do repeat while to until
|
||||||
syn keyword pascalStatement procedure function
|
syn keyword pascalStatement procedure function
|
||||||
syn keyword pascalStatement program begin end const var type
|
syn keyword pascalStatement program begin end const var type with
|
||||||
syn keyword pascalStruct record
|
syn keyword pascalStruct record
|
||||||
syn keyword pascalType array boolean char integer file pointer real set
|
syn keyword pascalType array boolean char integer file pointer real set
|
||||||
syn keyword pascalType string text variant
|
syn keyword pascalType string text variant
|
||||||
@@ -44,12 +44,12 @@ syn keyword pascalTodo contained TODO FIXME XXX DEBUG NOTE
|
|||||||
" 20010723az: When wanted, highlight the trailing whitespace -- this is
|
" 20010723az: When wanted, highlight the trailing whitespace -- this is
|
||||||
" based on c_space_errors; to enable, use "pascal_space_errors".
|
" based on c_space_errors; to enable, use "pascal_space_errors".
|
||||||
if exists("pascal_space_errors")
|
if exists("pascal_space_errors")
|
||||||
if !exists("pascal_no_trail_space_error")
|
if !exists("pascal_no_trail_space_error")
|
||||||
syn match pascalSpaceError "\s\+$"
|
syn match pascalSpaceError "\s\+$"
|
||||||
endif
|
endif
|
||||||
if !exists("pascal_no_tab_space_error")
|
if !exists("pascal_no_tab_space_error")
|
||||||
syn match pascalSpaceError " \+\t"me=e-1
|
syn match pascalSpaceError " \+\t"me=e-1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -102,9 +102,24 @@ if exists("pascal_symbol_operator")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
syn match pascalNumber "-\=\<\d\+\>"
|
syn match pascalNumber "-\=\<\d\+\>"
|
||||||
|
if !exists("pascal_traditional")
|
||||||
|
syn match pascalHexNumber "\$\x\+\>"
|
||||||
|
endif
|
||||||
|
if exists("pascal_fpc")
|
||||||
|
syn match pascalOctNumber "&\o\+\>"
|
||||||
|
syn match pascalBinNumber "%[01]\+\>"
|
||||||
|
endif
|
||||||
|
if exists("pascal_gpc")
|
||||||
|
syn match pascalExtendedNumber "\%([2-9]\|[12]\d\|3[0-6]\)#[[:alnum:]]\+\>"
|
||||||
|
endif
|
||||||
|
|
||||||
syn match pascalFloat "-\=\<\d\+\.\d\+\>"
|
syn match pascalFloat "-\=\<\d\+\.\d\+\>"
|
||||||
syn match pascalFloat "-\=\<\d\+\.\d\+[eE]-\=\d\+\>"
|
syn match pascalFloat "-\=\<\d\+\.\d\+[eE]-\=\d\+\>"
|
||||||
syn match pascalHexNumber "\$[0-9a-fA-F]\+\>"
|
|
||||||
|
if !exists("pascal_traditional")
|
||||||
|
" allow leading zeros
|
||||||
|
syn match pascalControlCharacter "#\%([01]\=\d\=\d\|2[0-4]\d\|25[0-5]\)\>"
|
||||||
|
endif
|
||||||
|
|
||||||
if exists("pascal_no_tabs")
|
if exists("pascal_no_tabs")
|
||||||
syn match pascalShowTab "\t"
|
syn match pascalShowTab "\t"
|
||||||
@@ -146,7 +161,7 @@ if !exists("pascal_traditional")
|
|||||||
syn keyword pascalStatement interface unit uses
|
syn keyword pascalStatement interface unit uses
|
||||||
syn keyword pascalModifier absolute assembler external far forward inline
|
syn keyword pascalModifier absolute assembler external far forward inline
|
||||||
syn keyword pascalModifier interrupt near virtual
|
syn keyword pascalModifier interrupt near virtual
|
||||||
syn keyword pascalAcces private public
|
syn keyword pascalAccess private public strict
|
||||||
syn keyword pascalStruct object
|
syn keyword pascalStruct object
|
||||||
syn keyword pascalOperator shl shr xor
|
syn keyword pascalOperator shl shr xor
|
||||||
|
|
||||||
@@ -161,6 +176,7 @@ if !exists("pascal_traditional")
|
|||||||
syn keyword pascalType Single Double Extended Comp
|
syn keyword pascalType Single Double Extended Comp
|
||||||
syn keyword pascalType PChar
|
syn keyword pascalType PChar
|
||||||
|
|
||||||
|
syn keyword pascalPredefined self
|
||||||
|
|
||||||
if !exists ("pascal_fpc")
|
if !exists ("pascal_fpc")
|
||||||
syn keyword pascalPredefined Result
|
syn keyword pascalPredefined Result
|
||||||
@@ -170,11 +186,11 @@ if !exists("pascal_traditional")
|
|||||||
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
|
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
|
||||||
syn keyword pascalStatement fail otherwise operator
|
syn keyword pascalStatement fail otherwise operator
|
||||||
syn keyword pascalDirective popstack
|
syn keyword pascalDirective popstack
|
||||||
syn keyword pascalPredefined self
|
|
||||||
syn keyword pascalType ShortString AnsiString WideString
|
syn keyword pascalType ShortString AnsiString WideString
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists("pascal_gpc")
|
if exists("pascal_gpc")
|
||||||
|
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
|
||||||
syn keyword pascalType SmallInt
|
syn keyword pascalType SmallInt
|
||||||
syn keyword pascalType AnsiChar
|
syn keyword pascalType AnsiChar
|
||||||
syn keyword pascalType PAnsiChar
|
syn keyword pascalType PAnsiChar
|
||||||
@@ -182,6 +198,8 @@ if !exists("pascal_traditional")
|
|||||||
|
|
||||||
if exists("pascal_delphi")
|
if exists("pascal_delphi")
|
||||||
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
|
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
|
||||||
|
syn region pascalDocumentation start="///" end="$" contains=pascalTodo,pascalSpaceError
|
||||||
|
syn region pascalDocumentation start="{!" end="}" contains=pascalTodo,pascalSpaceError
|
||||||
syn keyword pascalType SmallInt Int64
|
syn keyword pascalType SmallInt Int64
|
||||||
syn keyword pascalType Real48 Currency
|
syn keyword pascalType Real48 Currency
|
||||||
syn keyword pascalType AnsiChar WideChar
|
syn keyword pascalType AnsiChar WideChar
|
||||||
@@ -196,11 +214,11 @@ if !exists("pascal_traditional")
|
|||||||
syn keyword pascalStatement initialization finalization uses exports
|
syn keyword pascalStatement initialization finalization uses exports
|
||||||
syn keyword pascalStatement property out resourcestring threadvar
|
syn keyword pascalStatement property out resourcestring threadvar
|
||||||
syn keyword pascalModifier contains
|
syn keyword pascalModifier contains
|
||||||
syn keyword pascalModifier overridden reintroduce abstract
|
syn keyword pascalModifier overridden reintroduce abstract sealed
|
||||||
syn keyword pascalModifier override export dynamic name message
|
syn keyword pascalModifier override export dynamic name message
|
||||||
syn keyword pascalModifier dispid index stored default nodefault readonly
|
syn keyword pascalModifier dispid index stored default nodefault readonly
|
||||||
syn keyword pascalModifier writeonly implements overload requires resident
|
syn keyword pascalModifier writeonly implements overload requires resident
|
||||||
syn keyword pascalAcces protected published automated
|
syn keyword pascalAccess protected published automated
|
||||||
syn keyword pascalDirective register pascal cvar cdecl stdcall safecall
|
syn keyword pascalDirective register pascal cvar cdecl stdcall safecall
|
||||||
syn keyword pascalOperator as is
|
syn keyword pascalOperator as is
|
||||||
endif
|
endif
|
||||||
@@ -323,37 +341,43 @@ endif
|
|||||||
" Define the default highlighting.
|
" Define the default highlighting.
|
||||||
" Only when an item doesn't have highlighting yet
|
" Only when an item doesn't have highlighting yet
|
||||||
|
|
||||||
hi def link pascalAcces pascalStatement
|
hi def link pascalAccess pascalStatement
|
||||||
hi def link pascalBoolean Boolean
|
hi def link pascalBoolean Boolean
|
||||||
hi def link pascalComment Comment
|
hi def link pascalComment Comment
|
||||||
hi def link pascalConditional Conditional
|
hi def link pascalDocumentation Comment
|
||||||
|
hi def link pascalConditional Conditional
|
||||||
hi def link pascalConstant Constant
|
hi def link pascalConstant Constant
|
||||||
hi def link pascalDelimiter Identifier
|
hi def link pascalControlCharacter Character
|
||||||
hi def link pascalDirective pascalStatement
|
hi def link pascalDelimiter Identifier
|
||||||
hi def link pascalException Exception
|
hi def link pascalDirective pascalStatement
|
||||||
hi def link pascalFloat Float
|
hi def link pascalException Exception
|
||||||
|
hi def link pascalFloat Float
|
||||||
hi def link pascalFunction Function
|
hi def link pascalFunction Function
|
||||||
hi def link pascalLabel Label
|
hi def link pascalLabel Label
|
||||||
hi def link pascalMatrixDelimiter Identifier
|
hi def link pascalMatrixDelimiter Identifier
|
||||||
hi def link pascalModifier Type
|
hi def link pascalModifier Type
|
||||||
hi def link pascalNumber Number
|
hi def link pascalNumber Number
|
||||||
|
hi def link pascalExtendedNumber Number
|
||||||
|
hi def link pascalBinNumber pascalNumber
|
||||||
|
hi def link pascalHexNumber pascalNumber
|
||||||
|
hi def link pascalOctNumber pascalNumber
|
||||||
hi def link pascalOperator Operator
|
hi def link pascalOperator Operator
|
||||||
hi def link pascalPredefined pascalStatement
|
hi def link pascalPredefined pascalStatement
|
||||||
hi def link pascalPreProc PreProc
|
hi def link pascalPreProc PreProc
|
||||||
hi def link pascalRepeat Repeat
|
hi def link pascalRepeat Repeat
|
||||||
hi def link pascalSpaceError Error
|
hi def link pascalSpaceError Error
|
||||||
hi def link pascalStatement Statement
|
hi def link pascalStatement Statement
|
||||||
hi def link pascalString String
|
hi def link pascalString String
|
||||||
hi def link pascalStringEscape Special
|
hi def link pascalStringEscape Special
|
||||||
hi def link pascalStringEscapeGPC Special
|
hi def link pascalStringEscapeGPC Special
|
||||||
hi def link pascalStringError Error
|
hi def link pascalStringError Error
|
||||||
hi def link pascalStruct pascalStatement
|
hi def link pascalStruct pascalStatement
|
||||||
hi def link pascalSymbolOperator pascalOperator
|
hi def link pascalSymbolOperator pascalOperator
|
||||||
hi def link pascalTodo Todo
|
hi def link pascalTodo Todo
|
||||||
hi def link pascalType Type
|
hi def link pascalType Type
|
||||||
hi def link pascalUnclassified pascalStatement
|
hi def link pascalUnclassified pascalStatement
|
||||||
" hi def link pascalAsm Assembler
|
" hi def link pascalAsm Assembler
|
||||||
hi def link pascalError Error
|
hi def link pascalError Error
|
||||||
hi def link pascalAsmKey pascalStatement
|
hi def link pascalAsmKey pascalStatement
|
||||||
hi def link pascalShowTab Error
|
hi def link pascalShowTab Error
|
||||||
|
|
||||||
@@ -361,4 +385,4 @@ hi def link pascalShowTab Error
|
|||||||
|
|
||||||
let b:current_syntax = "pascal"
|
let b:current_syntax = "pascal"
|
||||||
|
|
||||||
" vim: ts=8 sw=2
|
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ endif
|
|||||||
" Version: 2.3.1
|
" Version: 2.3.1
|
||||||
" License: Vim license (see `:help license`)
|
" License: Vim license (see `:help license`)
|
||||||
|
|
||||||
" Based on PostgreSQL 13.1
|
" Based on PostgreSQL 13.2
|
||||||
" Automatically generated on 2021-02-07 at 10:45:10
|
" Automatically generated on 2021-04-22 at 08:36:13
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -717,8 +717,8 @@ syn keyword sqlConstant contained pageinspect pg_buffercache pg_freespacemap pg_
|
|||||||
syn keyword sqlConstant contained pg_stat_statements pg_trgm pg_visibility pgcrypto pgrouting pgrowlocks
|
syn keyword sqlConstant contained pg_stat_statements pg_trgm pg_visibility pgcrypto pgrouting pgrowlocks
|
||||||
syn keyword sqlConstant contained pgstattuple pgtap plperl plperlu plpgsql pltcl pltclu postgis
|
syn keyword sqlConstant contained pgstattuple pgtap plperl plperlu plpgsql pltcl pltclu postgis
|
||||||
syn keyword sqlConstant contained postgis_raster postgis_sfcgal postgis_tiger_geocoder postgis_topology
|
syn keyword sqlConstant contained postgis_raster postgis_sfcgal postgis_tiger_geocoder postgis_topology
|
||||||
syn keyword sqlConstant contained postgres_fdw refint seg sslinfo tablefunc tcn temporal_tables tsm_system_rows
|
syn keyword sqlConstant contained postgres_fdw refint seg sslinfo tablefunc tcn temporal_tables
|
||||||
syn keyword sqlConstant contained tsm_system_time unaccent xml2
|
syn keyword sqlConstant contained tsm_system_rows tsm_system_time unaccent xml2
|
||||||
" Legacy extensions names
|
" Legacy extensions names
|
||||||
syn keyword sqlConstant contained chkpass hstore_plpython2u hstore_plpython3u hstore_plpythonu
|
syn keyword sqlConstant contained chkpass hstore_plpython2u hstore_plpython3u hstore_plpythonu
|
||||||
syn keyword sqlConstant contained jsonb_plpython3u ltree_plpython2u ltree_plpython3u
|
syn keyword sqlConstant contained jsonb_plpython3u ltree_plpython2u ltree_plpython3u
|
||||||
@@ -2018,10 +2018,10 @@ let s:plgroups = 'plpgsql'
|
|||||||
|
|
||||||
" PL/<any other language>
|
" PL/<any other language>
|
||||||
fun! s:add_syntax(s)
|
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
|
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
|
let s:plgroups .= ',pgsqlpl' . a:s
|
||||||
endf
|
endf
|
||||||
|
|
||||||
for pl in get(b:, 'pgsql_pl', get(g:, 'pgsql_pl', []))
|
for pl in get(b:, 'pgsql_pl', get(g:, 'pgsql_pl', []))
|
||||||
@@ -2032,12 +2032,12 @@ endfor
|
|||||||
if get(g:, 'pgsql_fold_functions_only', 0)
|
if get(g:, 'pgsql_fold_functions_only', 0)
|
||||||
|
|
||||||
execute 'syn region sqlFold start=/^\s*\zs\c\%(create\s\+[a-z ]*\%(function\|procedure\)\|do\)\>/ end=/;$/ transparent fold '
|
execute 'syn region sqlFold start=/^\s*\zs\c\%(create\s\+[a-z ]*\%(function\|procedure\)\|do\)\>/ end=/;$/ transparent fold '
|
||||||
\ .. "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," .. s:plgroups
|
\ . "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," . s:plgroups
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
execute 'syn region sqlFold start=/^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>/ end=/;$/ transparent fold '
|
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
|
\ . "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," . s:plgroups
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -2071,3 +2071,4 @@ hi def link sqlCreateOperatorKeyword sqlKeyword
|
|||||||
hi def link sqlCreateTextSearchKeyword sqlKeyword
|
hi def link sqlCreateTextSearchKeyword sqlKeyword
|
||||||
|
|
||||||
let b:current_syntax = "sql"
|
let b:current_syntax = "sql"
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ endif
|
|||||||
" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc )
|
" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc )
|
||||||
" Maintainer: Magnus Woldrich <m@japh.se>
|
" Maintainer: Magnus Woldrich <m@japh.se>
|
||||||
" URL: http://github.com/trapd00r/vim-syntax-ratpoison
|
" URL: http://github.com/trapd00r/vim-syntax-ratpoison
|
||||||
" Last Change: 2011 Apr 11
|
" Last Change: 2021-04-12 13:46:04
|
||||||
" Previous Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
" Previous Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
@@ -42,7 +41,7 @@ syn keyword ratpoisonCommandArg select set setenv sfdump shrink contained
|
|||||||
syn keyword ratpoisonCommandArg source sselect startup_message time title contained
|
syn keyword ratpoisonCommandArg source sselect startup_message time title contained
|
||||||
syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained
|
syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained
|
||||||
syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained
|
syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained
|
||||||
syn keyword ratpoisonCommandArg windows contained
|
syn keyword ratpoisonCommandArg windows framefmt infofmt contained
|
||||||
|
|
||||||
syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained
|
syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained
|
||||||
syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained
|
syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained
|
||||||
@@ -96,19 +95,27 @@ syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg
|
|||||||
syn keyword ratpoisonSetArg bgcolor
|
syn keyword ratpoisonSetArg bgcolor
|
||||||
syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg
|
syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg
|
||||||
syn keyword ratpoisonSetArg fgcolor
|
syn keyword ratpoisonSetArg fgcolor
|
||||||
|
syn keyword ratpoisonSetArg framefmt contained nextgroup=ratpoisonWinFmtArg
|
||||||
syn keyword ratpoisonSetArg fwcolor
|
syn keyword ratpoisonSetArg fwcolor
|
||||||
|
syn keyword ratpoisonSetArg framemsgwait contained nextgroup=ratpoisonNumberArg
|
||||||
|
syn keyword ratpoisonSetArg gravity contained nextgroup=ratpoisonGravityArg
|
||||||
syn keyword ratpoisonSetArg bwcolor
|
syn keyword ratpoisonSetArg bwcolor
|
||||||
|
syn keyword ratpoisonSetArg gravity contained nextgroup=ratpoisonGravityArg
|
||||||
syn keyword ratpoisonSetArg historysize
|
syn keyword ratpoisonSetArg historysize
|
||||||
syn keyword ratpoisonSetArg historycompaction
|
syn keyword ratpoisonSetArg historycompaction
|
||||||
syn keyword ratpoisonSetArg historyexpansion
|
syn keyword ratpoisonSetArg historyexpansion
|
||||||
|
syn keyword ratpoisonSetArg infofmt contained nextgroup=ratpoisonWinFmtArg
|
||||||
syn keyword ratpoisonSetArg topkmap
|
syn keyword ratpoisonSetArg topkmap
|
||||||
syn keyword ratpoisonSetArg barinpadding
|
syn keyword ratpoisonSetArg barinpadding
|
||||||
syn keyword ratpoisonSetArg font
|
syn keyword ratpoisonSetArg font
|
||||||
syn keyword ratpoisonSetArg framesels
|
syn keyword ratpoisonSetArg framesels
|
||||||
|
syn keyword ratpoisonSetArg maxundos
|
||||||
syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg
|
syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg
|
||||||
syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg
|
syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg
|
||||||
|
syn keyword ratpoisonSetArg msgwait contained nextgroup=ratpoisonNumberArg
|
||||||
syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg
|
syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg
|
||||||
syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg
|
syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg
|
||||||
|
syn keyword ratpoisonSetArg startup_message
|
||||||
syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg
|
syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg
|
||||||
syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg
|
syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg
|
||||||
syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg
|
syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg
|
||||||
@@ -117,6 +124,8 @@ syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg
|
|||||||
syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg
|
syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg
|
||||||
|
|
||||||
syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
|
syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
|
||||||
|
syn match ratpoisonFrameFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
|
||||||
|
syn match ratpoisonInfoFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite
|
||||||
|
|
||||||
syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained
|
syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained
|
||||||
|
|
||||||
@@ -130,6 +139,7 @@ syn match ratpoisonDefCommand "^\s*defbgcolor\s*"
|
|||||||
syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg
|
syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg
|
||||||
syn match ratpoisonDefCommand "^\s*deffgcolor\s*"
|
syn match ratpoisonDefCommand "^\s*deffgcolor\s*"
|
||||||
syn match ratpoisonDefCommand "^\s*deffont\s*"
|
syn match ratpoisonDefCommand "^\s*deffont\s*"
|
||||||
|
syn match ratpoisonDefCommand "^\s*defframefmt\s*" nextgroup=ratpoisonWinFmtArg
|
||||||
syn match ratpoisonDefCommand "^\s*defframesels\s*"
|
syn match ratpoisonDefCommand "^\s*defframesels\s*"
|
||||||
syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg
|
syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg
|
||||||
syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg
|
syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg
|
||||||
@@ -247,14 +257,13 @@ syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$"
|
|||||||
syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$"
|
syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$"
|
||||||
syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$"
|
syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$"
|
||||||
|
|
||||||
" Define the default highlighting.
|
|
||||||
" Only when an item doesn't have highlighting yet
|
|
||||||
|
|
||||||
hi def link ratpoisonBooleanArg Boolean
|
hi def link ratpoisonBooleanArg Boolean
|
||||||
hi def link ratpoisonCommandArg Keyword
|
hi def link ratpoisonCommandArg Keyword
|
||||||
hi def link ratpoisonComment Comment
|
hi def link ratpoisonComment Comment
|
||||||
hi def link ratpoisonDefCommand Identifier
|
hi def link ratpoisonDefCommand Identifier
|
||||||
|
hi def link ratpoisonFrameFmtArg Special
|
||||||
hi def link ratpoisonGravityArg Constant
|
hi def link ratpoisonGravityArg Constant
|
||||||
|
hi def link ratpoisonInfoFmtArg Special
|
||||||
hi def link ratpoisonKeySeqArg Special
|
hi def link ratpoisonKeySeqArg Special
|
||||||
hi def link ratpoisonNumberArg Number
|
hi def link ratpoisonNumberArg Number
|
||||||
hi def link ratpoisonSetArg Keyword
|
hi def link ratpoisonSetArg Keyword
|
||||||
@@ -265,7 +274,6 @@ hi def link ratpoisonWinFmtArg Special
|
|||||||
hi def link ratpoisonWinNameArg Constant
|
hi def link ratpoisonWinNameArg Constant
|
||||||
hi def link ratpoisonWinListArg Constant
|
hi def link ratpoisonWinListArg Constant
|
||||||
|
|
||||||
|
|
||||||
let b:current_syntax = "ratpoison"
|
let b:current_syntax = "ratpoison"
|
||||||
|
|
||||||
" vim: ts=8
|
" vim: ts=8
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ endif
|
|||||||
" markdown Text with R statements
|
" markdown Text with R statements
|
||||||
" Language: markdown with R code chunks
|
" Language: markdown with R code chunks
|
||||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||||
" Last Change: Thu Apr 18, 2019 09:17PM
|
" Last Change: Wed Apr 21, 2021 09:55AM
|
||||||
"
|
"
|
||||||
" For highlighting pandoc extensions to markdown like citations and TeX and
|
" For highlighting pandoc extensions to markdown like citations and TeX and
|
||||||
" many other advanced features like folding of markdown sections, it is
|
" many other advanced features like folding of markdown sections, it is
|
||||||
@@ -17,27 +17,45 @@ if exists("b:current_syntax")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Configuration if not using pandoc syntax:
|
" Highlight the header of the chunks as R code
|
||||||
" Add syntax highlighting of YAML header
|
let g:rmd_syn_hl_chunk = get(g:, 'rmd_syn_hl_chunk', 0)
|
||||||
let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1)
|
|
||||||
" Add syntax highlighting of citation keys
|
|
||||||
let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1)
|
|
||||||
" Highlight the header of the chunk of R code
|
|
||||||
let g:rmd_syn_hl_chunk = get(g:, 'g:rmd_syn_hl_chunk', 0)
|
|
||||||
|
|
||||||
" Pandoc-syntax has more features, but it is slower.
|
" Pandoc-syntax has more features, but it is slower.
|
||||||
" https://github.com/vim-pandoc/vim-pandoc-syntax
|
" https://github.com/vim-pandoc/vim-pandoc-syntax
|
||||||
let g:pandoc#syntax#codeblocks#embeds#langs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', ['r'])
|
let g:pandoc#syntax#codeblocks#embeds#langs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', ['r'])
|
||||||
runtime syntax/pandoc.vim
|
runtime syntax/pandoc.vim
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
" Fix recognition of R code
|
" Recognize inline R code
|
||||||
syn region pandocDelimitedCodeBlock_r start=/^```{r\>.*}$/ end=/^```$/ contained containedin=pandocDelimitedCodeBlock contains=@R
|
|
||||||
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@R containedin=pandocLaTeXRegion,yamlFlowString keepend
|
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@R containedin=pandocLaTeXRegion,yamlFlowString keepend
|
||||||
hi def link rmdInlineDelim Delimiter
|
hi def link rmdInlineDelim Delimiter
|
||||||
|
|
||||||
|
" Fix recognition of language chunks (code adapted from pandoc, 2021-03-28)
|
||||||
|
" Knitr requires braces in the block's header
|
||||||
|
for s:lng in g:pandoc#syntax#codeblocks#embeds#langs
|
||||||
|
let s:nm = matchstr(s:lng, '^[^=]*')
|
||||||
|
exe 'syn clear pandocDelimitedCodeBlock_'.s:nm
|
||||||
|
exe 'syn clear pandocDelimitedCodeBlockinBlockQuote_'.s:nm
|
||||||
|
if g:rmd_syn_hl_chunk
|
||||||
|
exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@R'
|
||||||
|
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@'.toupper(s:nm)
|
||||||
|
else
|
||||||
|
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@'.toupper(s:nm)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
unlet s:lng
|
||||||
|
unlet s:nm
|
||||||
|
hi def link rmdInlineDelim Delimiter
|
||||||
|
hi def link rmdCodeDelim Delimiter
|
||||||
let b:current_syntax = "rmd"
|
let b:current_syntax = "rmd"
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Configuration if not using pandoc syntax:
|
||||||
|
" Add syntax highlighting of YAML header
|
||||||
|
let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1)
|
||||||
|
" Add syntax highlighting of citation keys
|
||||||
|
let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1)
|
||||||
|
|
||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
@@ -67,15 +85,17 @@ for s:type in g:rmd_fenced_languages
|
|||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
exe 'syn include @Rmd'.s:nm.' syntax/'.s:ft.'.vim'
|
exe 'syn include @Rmd'.s:nm.' syntax/'.s:ft.'.vim'
|
||||||
if g:rmd_syn_hl_chunk
|
if g:rmd_syn_hl_chunk
|
||||||
exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@Rmd'.s:nm
|
exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@Rmdr'
|
||||||
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@Rmd'.s:nm
|
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@Rmd'.s:nm
|
||||||
else
|
else
|
||||||
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.s:nm
|
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.s:nm
|
||||||
endif
|
endif
|
||||||
exe 'syn region rmd'.s:nm.'Inline matchgroup=rmdInlineDelim start="`'.s:nm.' " end="`" contains=@Rmd'.s:nm.' keepend'
|
|
||||||
endfor
|
endfor
|
||||||
unlet! s:type
|
unlet! s:type
|
||||||
|
|
||||||
|
" Recognize inline R code
|
||||||
|
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr keepend
|
||||||
|
|
||||||
hi def link rmdInlineDelim Delimiter
|
hi def link rmdInlineDelim Delimiter
|
||||||
hi def link rmdCodeDelim Delimiter
|
hi def link rmdCodeDelim Delimiter
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ syn cluster texParaGroup add=@rnoweb
|
|||||||
|
|
||||||
" Highlighting of R code using an existing r.vim syntax file if available {{{1
|
" Highlighting of R code using an existing r.vim syntax file if available {{{1
|
||||||
syn include @rnowebR syntax/r.vim
|
syn include @rnowebR syntax/r.vim
|
||||||
syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend
|
syn region rnowebChunk matchgroup=rnowebDelimiter start="^\s*<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend
|
||||||
syn match rnowebChunkReference "^<<.*>>$" contained
|
syn match rnowebChunkReference "^\s*<<.*>>$" contained
|
||||||
syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR contained
|
syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR contained
|
||||||
|
|
||||||
" Sweave options command {{{1
|
" Sweave options command {{{1
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ syntax match solNumber '\v\c<%(\d+%(e[+-]=\d+)=|0b[01]+|0o\o+|0x\x+)>
|
|||||||
syntax match solNumber '\v\c<%(\d+.\d+|\d+.|.\d+)%(e[+-]=\d+)=>'
|
syntax match solNumber '\v\c<%(\d+.\d+|\d+.|.\d+)%(e[+-]=\d+)=>'
|
||||||
|
|
||||||
" Strings
|
" Strings
|
||||||
syntax region solString start=/\v"/ skip=/\v\\./ end=/\v"/
|
syntax region solString start=/\v"/ skip=/\v\\./ end=/\v"/ contains=@Spell
|
||||||
syntax region solString start="\v'" skip="\v\\." end="\v'"
|
syntax region solString start="\v'" skip="\v\\." end="\v'" contains=@Spell
|
||||||
|
|
||||||
hi def link solNumber Number
|
hi def link solNumber Number
|
||||||
hi def link solString String
|
hi def link solString String
|
||||||
@@ -127,7 +127,7 @@ syn region solFuncBody contained contains=solDestructure,solComment,s
|
|||||||
\ end='}'
|
\ end='}'
|
||||||
syn match solFuncCall contained skipempty skipwhite nextgroup=solCallOptions,solFuncCallParens
|
syn match solFuncCall contained skipempty skipwhite nextgroup=solCallOptions,solFuncCallParens
|
||||||
\ '\v%(%(<if>|<uint>|<int>|<ufixed>|<bytes>|<address>|<string>|<bool>)\s*)@<!<[a-zA-Z_][0-9a-zA-Z_]*\s*%((\{(\n|.|\s)*\})?\s*(\((\n|.|\s)*\)))@='
|
\ '\v%(%(<if>|<uint>|<int>|<ufixed>|<bytes>|<address>|<string>|<bool>)\s*)@<!<[a-zA-Z_][0-9a-zA-Z_]*\s*%((\{(\n|.|\s)*\})?\s*(\((\n|.|\s)*\)))@='
|
||||||
syn region solFuncCallParens contained transparent contains=solString,solFuncCall,solConstant,solNumber,solMethod,solTypeCast,solComma,solOperator
|
syn region solFuncCallParens contained transparent contains=solComment,solString,solFuncCall,solConstant,solNumber,solMethod,solTypeCast,solComma,solOperator
|
||||||
\ start='('
|
\ start='('
|
||||||
\ end=')'
|
\ end=')'
|
||||||
|
|
||||||
@@ -304,8 +304,8 @@ hi def link solLoop Keyword
|
|||||||
|
|
||||||
" Comments
|
" Comments
|
||||||
syn keyword solTodo TODO FIXME XXX TBD contained
|
syn keyword solTodo TODO FIXME XXX TBD contained
|
||||||
syn region solComment start=/\/\// end=/$/ contains=solTodo
|
syn region solComment start=/\/\// end=/$/ contains=solTodo,@Spell
|
||||||
syn region solComment start=/\/\*/ end=/\*\// contains=solTodo
|
syn region solComment start=/\/\*/ end=/\*\// contains=solTodo,@Spell
|
||||||
|
|
||||||
hi def link solTodo Todo
|
hi def link solTodo Todo
|
||||||
hi def link solComment Comment
|
hi def link solComment Comment
|
||||||
@@ -318,8 +318,8 @@ syn match solNatspecTag /@notice\>/ contained
|
|||||||
syn match solNatspecTag /@param\>/ contained
|
syn match solNatspecTag /@param\>/ contained
|
||||||
syn match solNatspecTag /@return\>/ contained
|
syn match solNatspecTag /@return\>/ contained
|
||||||
syn match solNatspecParam /\(@param\s*\)\@<=\<[a-zA-Z_][0-9a-zA-Z_]*/
|
syn match solNatspecParam /\(@param\s*\)\@<=\<[a-zA-Z_][0-9a-zA-Z_]*/
|
||||||
syn region solNatspecBlock start=/\/\/\// end=/$/ contains=solTodo,solNatspecTag,solNatspecParam
|
syn region solNatspecBlock start=/\/\/\// end=/$/ contains=solTodo,solNatspecTag,solNatspecParam,@Spell
|
||||||
syn region solNatspecBlock start=/\/\*\{2}/ end=/\*\// contains=solTodo,solNatspecTag,solNatspecParam
|
syn region solNatspecBlock start=/\/\*\{2}/ end=/\*\// contains=solTodo,solNatspecTag,solNatspecParam,@Spell
|
||||||
|
|
||||||
hi def link solNatspecTag SpecialComment
|
hi def link solNatspecTag SpecialComment
|
||||||
hi def link solNatspecBlock Comment
|
hi def link solNatspecBlock Comment
|
||||||
|
|||||||
@@ -106,9 +106,12 @@ syntax keyword swiftAvailabilityArg renamed unavailable introduced deprecated ob
|
|||||||
|
|
||||||
" Keywords {{{
|
" Keywords {{{
|
||||||
syntax keyword swiftKeywords
|
syntax keyword swiftKeywords
|
||||||
|
\ actor
|
||||||
\ associatedtype
|
\ associatedtype
|
||||||
\ associativity
|
\ associativity
|
||||||
|
\ async
|
||||||
\ atexit
|
\ atexit
|
||||||
|
\ await
|
||||||
\ break
|
\ break
|
||||||
\ case
|
\ case
|
||||||
\ catch
|
\ catch
|
||||||
@@ -188,7 +191,6 @@ syntax region swiftEscapedReservedWord start="`" end="`" oneline
|
|||||||
|
|
||||||
syntax keyword swiftAttributes
|
syntax keyword swiftAttributes
|
||||||
\ @_exported
|
\ @_exported
|
||||||
\ @_functionBuilder
|
|
||||||
\ @_implementationOnly
|
\ @_implementationOnly
|
||||||
\ @_silgen_name
|
\ @_silgen_name
|
||||||
\ @assignment
|
\ @assignment
|
||||||
@@ -204,6 +206,8 @@ syntax keyword swiftAttributes
|
|||||||
\ @IBInspectable
|
\ @IBInspectable
|
||||||
\ @IBOutlet
|
\ @IBOutlet
|
||||||
\ @inlinable
|
\ @inlinable
|
||||||
|
\ @main
|
||||||
|
\ @MainActor
|
||||||
\ @noescape
|
\ @noescape
|
||||||
\ @nonobjc
|
\ @nonobjc
|
||||||
\ @noreturn
|
\ @noreturn
|
||||||
@@ -212,6 +216,8 @@ syntax keyword swiftAttributes
|
|||||||
\ @NSManaged
|
\ @NSManaged
|
||||||
\ @objc
|
\ @objc
|
||||||
\ @propertyWrapper
|
\ @propertyWrapper
|
||||||
|
\ @resultBuilder
|
||||||
|
\ @Sendable
|
||||||
\ @testable
|
\ @testable
|
||||||
\ @UIApplicationMain
|
\ @UIApplicationMain
|
||||||
\ @usableFromInline
|
\ @usableFromInline
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ if exists('b:current_syntax')
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpoptions
|
||||||
set cpo&vim
|
set cpoptions&vim
|
||||||
|
|
||||||
" Identifiers are made up of alphanumeric characters, underscores, and
|
" Identifiers are made up of alphanumeric characters, underscores, and
|
||||||
" hyphens.
|
" hyphens.
|
||||||
@@ -39,7 +39,7 @@ syn match terraBraces "[\[\]]"
|
|||||||
|
|
||||||
""" skip \" and \\ in strings.
|
""" skip \" and \\ in strings.
|
||||||
syn region terraValueString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=terraStringInterp
|
syn region terraValueString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=terraStringInterp
|
||||||
syn region terraStringInterp matchgroup=terraBraces start=/\${/ end=/}/ contained contains=ALL
|
syn region terraStringInterp matchgroup=terraBraces start=/\(^\|[^$]\)\$\zs{/ end=/}/ contained contains=ALL
|
||||||
syn region terraHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=terraStringInterp
|
syn region terraHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=terraStringInterp
|
||||||
|
|
||||||
"" Functions.
|
"" Functions.
|
||||||
@@ -71,5 +71,5 @@ hi def link terraValueNull Constant
|
|||||||
|
|
||||||
let b:current_syntax = 'terraform'
|
let b:current_syntax = 'terraform'
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpoptions = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'tmux', 'syntax/tmux.vim')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Language: tmux(1) configuration file
|
" Language: tmux(1) configuration file
|
||||||
" Version: 3.2-rc (git-e94bd5cc)
|
" Version: to_merge (git-c03b5746)
|
||||||
" URL: https://github.com/ericpruitt/tmux.vim/
|
" URL: https://github.com/ericpruitt/tmux.vim/
|
||||||
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
||||||
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
||||||
@@ -77,22 +77,22 @@ syn keyword tmuxOptions
|
|||||||
\ detach-on-destroy display-panes-active-colour display-panes-colour
|
\ detach-on-destroy display-panes-active-colour display-panes-colour
|
||||||
\ display-panes-time display-time exit-unattached extended-keys focus-events
|
\ display-panes-time display-time exit-unattached extended-keys focus-events
|
||||||
\ history-file history-limit key-table lock-after-time lock-command
|
\ history-file history-limit key-table lock-after-time lock-command
|
||||||
\ message-command-style message-limit aggressive-resize allow-rename
|
\ message-command-style message-limit message-style aggressive-resize
|
||||||
\ alternate-screen automatic-rename automatic-rename-format
|
\ allow-rename alternate-screen automatic-rename automatic-rename-format
|
||||||
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
|
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
|
||||||
\ copy-mode-mark-style copy-mode-match-style main-pane-height
|
\ copy-mode-mark-style copy-mode-match-style main-pane-height
|
||||||
\ main-pane-width message-style mode-keys mode-style monitor-activity
|
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell
|
||||||
\ monitor-bell monitor-silence mouse other-pane-height other-pane-width
|
\ monitor-silence mouse other-pane-height other-pane-width
|
||||||
\ pane-active-border-style pane-base-index pane-border-format
|
\ pane-active-border-style pane-base-index pane-border-format
|
||||||
\ pane-border-lines pane-border-status pane-border-style prefix prefix2
|
\ pane-border-lines pane-border-status pane-border-style prefix prefix2
|
||||||
\ remain-on-exit renumber-windows repeat-time set-clipboard set-titles
|
\ prompt-history-limit remain-on-exit renumber-windows repeat-time
|
||||||
\ set-titles-string silence-action status status-bg status-fg status-format
|
\ set-clipboard set-titles set-titles-string silence-action status status-bg
|
||||||
\ status-interval status-justify status-keys status-left status-left-length
|
\ status-fg status-format status-interval status-justify status-keys
|
||||||
\ status-left-style status-position status-right status-right-length
|
\ status-left status-left-length status-left-style status-position
|
||||||
\ status-right-style status-style synchronize-panes terminal-features
|
\ status-right status-right-length status-right-style status-style
|
||||||
\ terminal-overrides update-environment user-keys visual-activity
|
\ synchronize-panes terminal-features terminal-overrides update-environment
|
||||||
\ visual-bell visual-silence window-active-style window-size
|
\ user-keys visual-activity visual-bell visual-silence window-active-style
|
||||||
\ window-status-activity-style window-status-bell-style
|
\ window-size window-status-activity-style window-status-bell-style
|
||||||
\ window-status-current-format window-status-current-style
|
\ window-status-current-format window-status-current-style
|
||||||
\ window-status-format window-status-last-style window-status-separator
|
\ window-status-format window-status-last-style window-status-separator
|
||||||
\ window-status-style window-style word-separators wrap-search
|
\ window-status-style window-style word-separators wrap-search
|
||||||
@@ -108,18 +108,19 @@ syn keyword tmuxCommands
|
|||||||
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
||||||
\ lock-server lock-session lockc last-pane lastp locks ls last last-window
|
\ lock-server lock-session lockc last-pane lastp locks ls last last-window
|
||||||
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
|
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
|
||||||
\ movep movew new new-session new-window neww next next-layout next-window
|
\ clear-prompt-history clearphist movep movew new new-session new-window
|
||||||
\ nextl paste-buffer pasteb pipe-pane pipep popup prev previous-layout
|
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
|
||||||
\ previous-window prevl refresh refresh-client rename rename-session
|
\ pipep popup prev previous-layout previous-window prevl refresh
|
||||||
\ rename-window renamew resize-pane resize-window resizep resizew
|
\ refresh-client rename rename-session rename-window renamew resize-pane
|
||||||
\ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run
|
\ resize-window resizep resizew respawn-pane respawn-window respawnp
|
||||||
\ run-shell save-buffer saveb select-layout select-pane select-window
|
\ respawnw rotate-window rotatew run run-shell save-buffer saveb
|
||||||
\ selectl selectp selectw send send-keys send-prefix set set-buffer
|
\ select-layout select-pane select-window selectl selectp selectw send
|
||||||
\ set-environment set-hook set-option set-window-option setb setenv setw
|
\ send-keys send-prefix set set-buffer set-environment set-hook set-option
|
||||||
\ show show-buffer show-environment show-hooks show-messages show-options
|
\ set-window-option setb setenv setw show show-buffer show-environment
|
||||||
\ show-window-options showb showenv showmsgs showw source source-file
|
\ show-hooks show-messages show-options show-prompt-history
|
||||||
\ split-window splitw start start-server suspend-client suspendc swap-pane
|
\ show-window-options showb showenv showmsgs showphist showw source
|
||||||
\ swap-window swapp swapw switch-client switchc unbind unbind-key
|
\ source-file split-window splitw start start-server suspend-client suspendc
|
||||||
|
\ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key
|
||||||
\ unlink-window unlinkw wait wait-for
|
\ unlink-window unlinkw wait wait-for
|
||||||
|
|
||||||
let &cpo = s:original_cpo
|
let &cpo = s:original_cpo
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ hi def link vShebang Include
|
|||||||
syn keyword vStatement defer go goto return break continue
|
syn keyword vStatement defer go goto return break continue
|
||||||
hi def link vStatement Statement
|
hi def link vStatement Statement
|
||||||
|
|
||||||
syn keyword vConditional if else match or
|
syn keyword vConditional if else match or select
|
||||||
hi def link vConditional Conditional
|
hi def link vConditional Conditional
|
||||||
|
|
||||||
syn keyword vRepeat for in
|
syn keyword vRepeat for in
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ highlight default link zigStructure Structure
|
|||||||
highlight default link zigExecution Special
|
highlight default link zigExecution Special
|
||||||
highlight default link zigMacro Macro
|
highlight default link zigMacro Macro
|
||||||
highlight default link zigConditional Conditional
|
highlight default link zigConditional Conditional
|
||||||
highlight default link zigComparatorWord Operator
|
highlight default link zigComparatorWord Keyword
|
||||||
highlight default link zigRepeat Repeat
|
highlight default link zigRepeat Repeat
|
||||||
highlight default link zigSpecial Special
|
highlight default link zigSpecial Special
|
||||||
highlight default link zigVarDecl Function
|
highlight default link zigVarDecl Function
|
||||||
|
|||||||
Reference in New Issue
Block a user