mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a55b6aa3aa | ||
|
|
1d45a6d4f0 | ||
|
|
420a65e9b0 | ||
|
|
2254b83675 | ||
|
|
12755e3583 | ||
|
|
cbad6b1e0a | ||
|
|
fabb550c17 | ||
|
|
9d9ed14485 | ||
|
|
5005f1e27a | ||
|
|
571f76e6b6 | ||
|
|
e4f906d9a5 | ||
|
|
8b3a563bd0 | ||
|
|
0475f2b8d1 | ||
|
|
1d9a032a66 | ||
|
|
86721731c7 |
18
.github/ISSUE_TEMPLATE/add-language.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/add-language.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Add language
|
||||
about: Add support for new language
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- vim-polyglot accepts only lightweight, maintained github-hosted vim plugins -->
|
||||
|
||||
**GitHub repository url**
|
||||
|
||||
|
||||
**Is this plugin well maintained?**
|
||||
|
||||
|
||||
**Is this plugin lightweight? (no advanced functionality, just indent and syntax support)**
|
||||
20
.github/ISSUE_TEMPLATE/add-support-for-language.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/add-support-for-language.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Add support for language
|
||||
about: ''
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
16
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
16
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report vim-polyglot bug
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Vim-polyglot is not responsible for bugs of plugins it uses. Please report only bugs that happen when plugin is used as part of vim-polyglot and doesn't happen when just install the plugin -->
|
||||
|
||||
**Does this bug happen when you install plugin without vim-polyglot?**
|
||||
|
||||
**Describe the bug:**
|
||||
|
||||
**To Reproduce:**
|
||||
@@ -1,6 +1,6 @@
|
||||
language: ruby
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 2.6
|
||||
sudo: false
|
||||
addons:
|
||||
apt:
|
||||
|
||||
14
README.md
14
README.md
@@ -1,4 +1,6 @@
|
||||
# vim-polyglot [![Build Status][travis-img-url]][travis-url] []()
|
||||

|
||||
|
||||
[![Build Status][travis-img-url]][travis-url] []()
|
||||
|
||||
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.svg
|
||||
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
|
||||
@@ -8,7 +10,7 @@ A collection of language packs for Vim.
|
||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 100+ times faster** than the <!--Package Count-->128<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->132<!--/Package Count--> packages it consists of.
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||
@@ -43,6 +45,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
## Language packs
|
||||
|
||||
<!--Language Packs-->
|
||||
- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (syntax)
|
||||
- [ansible](https://github.com/pearofducks/ansible-vim) (syntax, indent, ftplugin)
|
||||
- [apiblueprint](https://github.com/sheerun/apiblueprint.vim) (syntax)
|
||||
- [applescript](https://github.com/mityu/vim-applescript) (syntax, indent)
|
||||
@@ -57,10 +60,11 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [cjsx](https://github.com/mtscout6/vim-cjsx) (syntax, ftplugin)
|
||||
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin)
|
||||
- [cmake](https://github.com/pboettch/vim-cmake-syntax) (syntax, indent)
|
||||
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin)
|
||||
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, compiler, indent, autoload, ftplugin)
|
||||
- [cql](https://github.com/elubow/cql-vim) (syntax)
|
||||
- [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) (syntax, compiler, ftplugin)
|
||||
- [crystal](https://github.com/rhysd/vim-crystal) (syntax, indent, autoload, ftplugin)
|
||||
- [csv](https://github.com/chrisbra/csv.vim) (syntax, autoload, ftplugin)
|
||||
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin)
|
||||
- [cue](https://github.com/mgrabovsky/vim-cuesheet) (syntax)
|
||||
- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, autoload, ftplugin)
|
||||
@@ -80,7 +84,6 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax)
|
||||
- [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)
|
||||
- [gradle](https://github.com/tfnico/vim-gradle) (compiler)
|
||||
- [graphql](https://github.com/jparise/vim-graphql) (syntax, indent, ftplugin)
|
||||
- [groovy-indent](https://github.com/vim-scripts/groovyindent-unix) (indent)
|
||||
- [groovy](https://github.com/vim-scripts/groovy.vim) (syntax)
|
||||
- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin)
|
||||
@@ -103,8 +106,10 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [kotlin](https://github.com/udalov/kotlin-vim) (syntax, indent, ftplugin)
|
||||
- [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin)
|
||||
- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin)
|
||||
- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (syntax, indent, compiler, ftplugin)
|
||||
- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin)
|
||||
- [livescript](https://github.com/gkz/vim-ls) (syntax, indent, compiler, ftplugin)
|
||||
- [llvm](https://github.com/rhysd/vim-llvm) (syntax, indent, ftplugin)
|
||||
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
|
||||
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
|
||||
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent)
|
||||
@@ -148,6 +153,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, autoload, ftplugin)
|
||||
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin)
|
||||
- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent)
|
||||
- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin)
|
||||
- [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin)
|
||||
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin)
|
||||
- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin)
|
||||
|
||||
477
after/ftplugin/llvm.vim
Normal file
477
after/ftplugin/llvm.vim
Normal file
@@ -0,0 +1,477 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2018 rhysd
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
" THE SOFTWARE.
|
||||
|
||||
if get(g:, 'llvm_extends_official', 1) == 0
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:llvm_ext_no_mapping = get(g:, 'llvm_ext_no_mapping', 0)
|
||||
let g:llvm_ext_lli_executable = get(g:, 'llvm_ext_lli_executable', 'lli')
|
||||
|
||||
let s:KIND_BLOCK_PREC = 0
|
||||
let s:KIND_BLOCK_FOLLOW = 1
|
||||
let s:KIND_FUNC_BEGIN = 2
|
||||
let s:KIND_FUNC_END = 3
|
||||
|
||||
function! s:section_delim_at(lnum) abort
|
||||
let line = getline(a:lnum)
|
||||
let m = matchlist(line, '^\([^:]\+\):\%( \+; preds = \(%.\+\)\)\=$')
|
||||
if !empty(m)
|
||||
if m[2] ==# ''
|
||||
return [s:KIND_BLOCK_PREC, m[1]]
|
||||
else
|
||||
return [s:KIND_BLOCK_FOLLOW, m[1], split(m[2], ',\s*')]
|
||||
endif
|
||||
endif
|
||||
if line =~# '^}$'
|
||||
return [s:KIND_FUNC_END]
|
||||
endif
|
||||
if line =~# '^define\>'
|
||||
return [s:KIND_FUNC_BEGIN]
|
||||
endif
|
||||
return []
|
||||
endfunction
|
||||
|
||||
function! s:is_section_delim(line, func_delim) abort
|
||||
let sec = s:section_delim_at(a:line)
|
||||
if empty(sec)
|
||||
return 0
|
||||
endif
|
||||
let kind = sec[0]
|
||||
return kind == s:KIND_BLOCK_PREC || kind == s:KIND_BLOCK_FOLLOW || kind == func_delim
|
||||
endfunction
|
||||
|
||||
function! s:next_section(stop_func_begin) abort
|
||||
let func_delim = a:stop_func_begin ? s:KIND_FUNC_BEGIN : s:KIND_FUNC_END
|
||||
let last = line('$') - 1
|
||||
let line = line('.')
|
||||
while line < last
|
||||
let line += 1
|
||||
if s:is_section_delim(line, func_delim)
|
||||
call cursor(line, col('.'))
|
||||
return
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
function! s:prev_section(stop_func_begin) abort
|
||||
let func_delim = a:stop_func_begin ? s:KIND_FUNC_BEGIN : s:KIND_FUNC_END
|
||||
let line = line('.')
|
||||
while line > 1
|
||||
let line -= 1
|
||||
if s:is_section_delim(line, func_delim)
|
||||
call cursor(line, col('.'))
|
||||
return
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
if !g:llvm_ext_no_mapping
|
||||
nnoremap <buffer><silent>]] :<C-u>call <SID>next_section(1)<CR>
|
||||
nnoremap <buffer><silent>[[ :<C-u>call <SID>prev_section(1)<CR>
|
||||
nnoremap <buffer><silent>][ :<C-u>call <SID>next_section(0)<CR>
|
||||
nnoremap <buffer><silent>[] :<C-u>call <SID>prev_section(0)<CR>
|
||||
endif
|
||||
|
||||
function! s:function_range_at(linum) abort
|
||||
let line = a:linum
|
||||
while line >= 1
|
||||
let s = getline(line)
|
||||
if s =~# '^define\>'
|
||||
let start = line
|
||||
break
|
||||
elseif s =~# '^}$'
|
||||
return []
|
||||
endif
|
||||
let line -= 1
|
||||
endwhile
|
||||
if line < 1
|
||||
return []
|
||||
endif
|
||||
|
||||
let line = a:linum
|
||||
let last = line('$')
|
||||
while line <= last
|
||||
let s = getline(line)
|
||||
if s =~# '^}$'
|
||||
let end = line
|
||||
break
|
||||
elseif s =~# '^define\>'
|
||||
return []
|
||||
endif
|
||||
let line += 1
|
||||
endwhile
|
||||
if line > last
|
||||
return []
|
||||
endif
|
||||
|
||||
return [start, end]
|
||||
endfunction
|
||||
|
||||
function! s:blocks_graph_at(linum) abort
|
||||
let func_range = s:function_range_at(a:linum)
|
||||
if empty(func_range)
|
||||
return {}
|
||||
endif
|
||||
let line = func_range[0] + 1
|
||||
let last = func_range[1] - 1
|
||||
let graph = {}
|
||||
while line <= last
|
||||
let block = s:section_delim_at(line)
|
||||
if empty(block)
|
||||
let line += 1
|
||||
continue
|
||||
endif
|
||||
let block_name = '%' . block[1]
|
||||
if block[0] == s:KIND_BLOCK_PREC
|
||||
let graph[block_name] = {'line': line, 'follows': [], 'preds': []}
|
||||
elseif block[0] == s:KIND_BLOCK_FOLLOW
|
||||
let graph[block_name] = {'line': line, 'follows': [], 'preds': block[2]}
|
||||
for follow in block[2]
|
||||
call add(graph[follow].follows, block_name)
|
||||
endfor
|
||||
else
|
||||
echoerr 'unreachable'
|
||||
endif
|
||||
let line += 1
|
||||
endwhile
|
||||
return graph
|
||||
endfunction
|
||||
|
||||
function! s:find_pred_block(linum) abort
|
||||
let sec = s:section_delim_at(a:linum)
|
||||
if empty(sec) || sec[0] != s:KIND_BLOCK_PREC && sec[0] != s:KIND_BLOCK_FOLLOW
|
||||
throw 'No block is starting at line ' . a:linum
|
||||
endif
|
||||
if sec[0] != s:KIND_BLOCK_FOLLOW
|
||||
throw printf("Block '%s' has no pred block", sec[1])
|
||||
endif
|
||||
let block_name = '%' . sec[1]
|
||||
let pred_block = sec[2][0]
|
||||
|
||||
let graph = s:blocks_graph_at(a:linum)
|
||||
if empty(graph)
|
||||
throw 'No block is found in function at line ' . a:linum
|
||||
endif
|
||||
|
||||
if !has_key(graph, pred_block)
|
||||
throw printf("Block '%s' (pred block of '%s') not found in function", pred_block, block_name)
|
||||
endif
|
||||
return graph[pred_block]
|
||||
endfunction
|
||||
|
||||
function! s:move_to_pred_block() abort
|
||||
try
|
||||
let b = s:find_pred_block(line('.'))
|
||||
call cursor(b.line, col('.'))
|
||||
catch
|
||||
echohl ErrorMsg | echom v:exception | echohl None
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! s:find_following_block(linum) abort
|
||||
let sec = s:section_delim_at(a:linum)
|
||||
if empty(sec) || sec[0] != s:KIND_BLOCK_PREC && sec[0] != s:KIND_BLOCK_FOLLOW
|
||||
throw 'No block is starting at line ' . a:linum
|
||||
endif
|
||||
let block_name = '%' . sec[1]
|
||||
|
||||
let graph = s:blocks_graph_at(a:linum)
|
||||
if empty(graph)
|
||||
throw 'No block is found in function at line ' . a:linum
|
||||
endif
|
||||
|
||||
let follows = graph[block_name].follows
|
||||
if empty(follows)
|
||||
throw printf("Block '%s' has no following block", block_name)
|
||||
endif
|
||||
|
||||
echom printf("Block '%s' has %d following blocks: %s", block_name, len(follows), join(follows, ', '))
|
||||
|
||||
if !has_key(graph, follows[0])
|
||||
throw printf("Block '%s' is not defined in function at line %d", follows[0], a:linum)
|
||||
endif
|
||||
return graph[follows[0]]
|
||||
endfunction
|
||||
|
||||
function! s:move_to_following_block() abort
|
||||
try
|
||||
let b = s:find_following_block(line('.'))
|
||||
call cursor(b.line, col('.'))
|
||||
catch
|
||||
echohl ErrorMsg | echom v:exception | echohl None
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
if !g:llvm_ext_no_mapping
|
||||
nnoremap <buffer><silent>[b :<C-u>call <SID>move_to_pred_block()<CR>
|
||||
nnoremap <buffer><silent>]b :<C-u>call <SID>move_to_following_block()<CR>
|
||||
endif
|
||||
|
||||
function! s:get_func_identifiers(line) abort
|
||||
let idx = stridx(a:line, '@')
|
||||
if idx == -1
|
||||
" Invalid signature
|
||||
return []
|
||||
endif
|
||||
|
||||
" e.g. define internal i32 @foo(...) { -> @foo(...) {
|
||||
let sig = a:line[idx:]
|
||||
|
||||
let idx = stridx(sig, '(')
|
||||
if idx == -1
|
||||
" Invalid signature
|
||||
return []
|
||||
endif
|
||||
|
||||
" @foo(...) { -> @foo
|
||||
let idents = [sig[:idx-1]]
|
||||
|
||||
" @foo(...) { -> ...) {
|
||||
let params = sig[idx+1:]
|
||||
|
||||
let idx = strridx(sig, ')')
|
||||
if idx == -1
|
||||
return idents
|
||||
endif
|
||||
|
||||
" ...) { -> ...
|
||||
let params = params[:idx-1]
|
||||
|
||||
" Gather parameters in function signature
|
||||
while params !=# ''
|
||||
let m = matchlist(params, '^[^%]*\(%\%("[^"]\+"\|[[:alnum:]_.]\+\)\)\s*\(.*\)$')
|
||||
if empty(m)
|
||||
break
|
||||
endif
|
||||
let idents += [m[1]]
|
||||
let params = m[2]
|
||||
endwhile
|
||||
|
||||
return idents
|
||||
endfunction
|
||||
|
||||
function! s:get_identifiers(line) abort
|
||||
" Registers and type defs
|
||||
let m = matchlist(a:line, '^\s*\(%\S\+\)\s\+=')
|
||||
if !empty(m)
|
||||
return [m[1]]
|
||||
endif
|
||||
|
||||
" Constants
|
||||
let m = matchlist(a:line, '^\(@\S\+\)\s\+=.\+\<constant\>')
|
||||
if !empty(m)
|
||||
return [m[1]]
|
||||
endif
|
||||
|
||||
" Labels for basic blocks
|
||||
let m = matchlist(a:line, '^\([^:]\+\):\%(\s\+; preds = .\+\)\=$')
|
||||
if !empty(m)
|
||||
return ['%' . m[1]]
|
||||
endif
|
||||
|
||||
" Meta variables
|
||||
let m = matchlist(a:line, '^\(!\S\+\)\s\+=')
|
||||
if !empty(m)
|
||||
return [m[1]]
|
||||
endif
|
||||
|
||||
" Attributes
|
||||
let m = matchlist(a:line, '^attributes\s\+\(#\d\+\)\s\+=')
|
||||
if !empty(m)
|
||||
return [m[1]]
|
||||
endif
|
||||
|
||||
if a:line =~# '^\%(declare\|define\)\>'
|
||||
return s:get_func_identifiers(a:line)
|
||||
endif
|
||||
|
||||
return []
|
||||
endfunction
|
||||
|
||||
function! s:extract_identifier(word) abort
|
||||
if strlen(a:word) <= 1
|
||||
return ''
|
||||
endif
|
||||
|
||||
let prefix = a:word[0]
|
||||
if prefix ==# '@' || prefix ==# '%' || prefix ==# '!'
|
||||
if prefix ==# '!' && a:word[1] ==# '{'
|
||||
return ''
|
||||
endif
|
||||
|
||||
if a:word[1] == '"'
|
||||
let idx = stridx(a:word, '"', 2)
|
||||
if idx == -1
|
||||
return ''
|
||||
endif
|
||||
" @"foo" or %"foo"
|
||||
return a:word[:idx]
|
||||
else
|
||||
" @foo or %foo
|
||||
return matchstr(a:word, '^[@%!][[:alnum:]_.]\+')
|
||||
endif
|
||||
endif
|
||||
|
||||
if prefix ==# '#'
|
||||
return matchstr(a:word, '^#\d\+')
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:jump_to_identifier_at(linum, ident) abort
|
||||
let line = getline(a:linum)
|
||||
let column = stridx(line, a:ident) + 1
|
||||
if column == 0
|
||||
let column = col('.')
|
||||
endif
|
||||
call cursor(a:linum, column)
|
||||
endfunction
|
||||
|
||||
function! s:browser_open_command() abort
|
||||
if exists('g:llvm_ext_browser_open_command')
|
||||
return g:llvm_ext_browser_open_command
|
||||
endif
|
||||
if exists('s:browser_opener')
|
||||
return s:browser_opener
|
||||
endif
|
||||
let s:browser_opener = ''
|
||||
if has('mac')
|
||||
let s:browser_opener = 'open'
|
||||
elseif has('win32') || has('win64')
|
||||
let s:browser_opener = 'cmd /q /c start ""'
|
||||
else
|
||||
for cmd in ['xdg-open', 'chromium', 'google-chrome', 'firefox']
|
||||
if executable(cmd)
|
||||
let s:browser_opener = cmd
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
return s:browser_opener
|
||||
endfunction
|
||||
|
||||
function! s:open_browser(url) abort
|
||||
let cmd = s:browser_open_command()
|
||||
if cmd ==# ''
|
||||
throw "Failed to open a browser. I don't know how to open a browser: Please set g:llvm_ext_browser_open_command"
|
||||
endif
|
||||
let cmdline = cmd . ' ' . shellescape(a:url)
|
||||
let out = system(cmdline)
|
||||
if v:shell_error
|
||||
throw printf("Failed to open a browser with command '%s': %s", cmdline, out)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:goto_definition() abort
|
||||
" Open language reference manual under the cursor in browser
|
||||
let syn_name = synIDattr(synID(line('.'),col('.'),1),'name')
|
||||
if syn_name ==# 'llvmStatement'
|
||||
let word = expand('<cword>')
|
||||
if word !=# ''
|
||||
try
|
||||
" Open browser assuming a word under the cursor is an instruction
|
||||
call s:open_browser('https://llvm.org/docs/LangRef.html#' . word . '-instruction')
|
||||
catch /^Failed to open a browser/
|
||||
echohl ErrorMsg | echom v:exception | echohl None
|
||||
endtry
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
" XXX: This does not support identifiers which contains spaces
|
||||
let word = expand('<cWORD>')
|
||||
if word ==# ''
|
||||
echom 'No identifier found under the cursor'
|
||||
return
|
||||
endif
|
||||
let ident = s:extract_identifier(word)
|
||||
if ident ==# ''
|
||||
echom 'No identifier found under the cursor'
|
||||
return
|
||||
endif
|
||||
|
||||
" Definition tends to be near its usages. Look back at first.
|
||||
let line = line('.')
|
||||
while line > 0
|
||||
for found in s:get_identifiers(getline(line))
|
||||
if ident ==# found
|
||||
call s:jump_to_identifier_at(line, ident)
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
let line -= 1
|
||||
endwhile
|
||||
|
||||
let line = line('.') + 1
|
||||
let last = line('$')
|
||||
while line <= last
|
||||
for found in s:get_identifiers(getline(line))
|
||||
if ident ==# found
|
||||
call s:jump_to_identifier_at(line, ident)
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
let line += 1
|
||||
endwhile
|
||||
|
||||
echom "No definition for '" . ident . "' found"
|
||||
endfunction
|
||||
|
||||
if !g:llvm_ext_no_mapping
|
||||
nnoremap <buffer><silent>K :<C-u>call <SID>goto_definition()<CR>
|
||||
endif
|
||||
|
||||
function! s:run_lli(...) abort
|
||||
if !has('job') || !has('channel') || !has('terminal')
|
||||
echohl ErrorMsg
|
||||
echomsg ':LLI requires terminal feature. Please update your Vim to 8.0+'
|
||||
echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
if !executable(g:llvm_ext_lli_executable)
|
||||
echohl ErrorMsg
|
||||
echomsg g:llvm_ext_lli_executable . ' is not executable. Please set g:llvm_ext_lli_executable'
|
||||
echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
if a:0 > 0
|
||||
let bufnr = term_start([g:llvm_ext_lli_executable, a:1])
|
||||
echo 'Run lli in termnal buffer(' . bufnr . ')'
|
||||
return
|
||||
endif
|
||||
|
||||
let tmpfile = tempname()
|
||||
call writefile(getline(1, '$'), tmpfile)
|
||||
let Cleanup = {ch -> filereadable(tmpfile) ? delete(tmpfile) : 0}
|
||||
let bufnr = term_start([g:llvm_ext_lli_executable, tmpfile], {'close_cb': Cleanup, 'exit_cb': Cleanup})
|
||||
echo 'Run lli in termnal buffer(' . bufnr . ')'
|
||||
endfunction
|
||||
|
||||
if !exists(':LLI')
|
||||
command! -buffer -nargs=? -bar -complete=file LLI call <SID>run_lli(<f-args>)
|
||||
endif
|
||||
@@ -1,37 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: CoffeeScript
|
||||
" Maintainer: Mick Koch <mick@kochm.co>
|
||||
" URL: http://github.com/kchmck/vim-coffee-script
|
||||
" License: WTFPL
|
||||
|
||||
" Load the coffee and html indent functions.
|
||||
silent! unlet b:did_indent
|
||||
runtime indent/coffee.vim
|
||||
let s:coffeeIndentExpr = &l:indentexpr
|
||||
|
||||
" Load html last so it can overwrite coffee settings.
|
||||
silent! unlet b:did_indent
|
||||
runtime indent/html.vim
|
||||
let s:htmlIndentExpr = &l:indentexpr
|
||||
|
||||
" Inject our wrapper indent function.
|
||||
setlocal indentexpr=GetCoffeeHtmlIndent(v:lnum)
|
||||
|
||||
function! GetCoffeeHtmlIndent(curlinenum)
|
||||
" See if we're inside a coffeescript block.
|
||||
let scriptlnum = searchpair('<script [^>]*type=[''"]\?text/coffeescript[''"]\?[^>]*>', '',
|
||||
\ '</script>', 'bWn')
|
||||
let prevlnum = prevnonblank(a:curlinenum)
|
||||
|
||||
" If we're in the script block and the previous line isn't the script tag
|
||||
" itself, use coffee indenting.
|
||||
if scriptlnum && scriptlnum != prevlnum
|
||||
exec 'return ' s:coffeeIndentExpr
|
||||
endif
|
||||
|
||||
" Otherwise use html indenting.
|
||||
exec 'return ' s:htmlIndentExpr
|
||||
endfunction
|
||||
@@ -1,27 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: CoffeeScript
|
||||
" Maintainer: Sven Felix Oberquelle <Svelix.Github@gmail.com>
|
||||
" URL: http://github.com/kchmck/vim-coffee-script
|
||||
" License: WTFPL
|
||||
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax_save = b:current_syntax
|
||||
endif
|
||||
|
||||
" Inherit coffee from html so coffeeComment isn't redefined and given higher
|
||||
" priority than hamlInterpolation.
|
||||
syn cluster hamlCoffeescript contains=@htmlCoffeeScript
|
||||
syn region hamlCoffeescriptFilter matchgroup=hamlFilter
|
||||
\ start="^\z(\s*\):coffee\z(script\)\?\s*$"
|
||||
\ end="^\%(\z1 \| *$\)\@!"
|
||||
\ contains=@hamlCoffeeScript,hamlInterpolation
|
||||
\ keepend
|
||||
|
||||
if exists('s:current_syntax_save')
|
||||
let b:current_syntax = s:current_syntax_save
|
||||
unlet s:current_syntax_save
|
||||
endif
|
||||
@@ -1,40 +1,3 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: CoffeeScript
|
||||
" Maintainer: Mick Koch <mick@kochm.co>
|
||||
" URL: http://github.com/kchmck/vim-coffee-script
|
||||
" License: WTFPL
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax_save = b:current_syntax
|
||||
endif
|
||||
|
||||
" Syntax highlighting for text/coffeescript script tags
|
||||
syn include @htmlCoffeeScript syntax/coffee.vim
|
||||
syn region coffeeScript start=#<script [^>]*type=['"]\?text/coffeescript['"]\?[^>]*>#
|
||||
\ end=#</script>#me=s-1 keepend
|
||||
\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc
|
||||
\ containedin=htmlHead
|
||||
|
||||
if exists('s:current_syntax_save')
|
||||
let b:current_syntax = s:current_syntax_save
|
||||
unlet s:current_syntax_save
|
||||
endif
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'glsl') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: OpenGL Shading Language
|
||||
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>
|
||||
|
||||
syn include @GLSL syntax/glsl.vim
|
||||
syn region ShaderScript
|
||||
\ start="<script [^>]*type=\('\|\"\)x-shader/x-\(vertex\|fragment\)\('\|\"\)[^>]*>"
|
||||
\ keepend
|
||||
\ end="</script>"me=s-1
|
||||
\ contains=@GLSL,htmlScriptTag,@htmlPreproc
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'html5') != -1
|
||||
finish
|
||||
endif
|
||||
@@ -51,33 +14,3 @@ endif
|
||||
" https://github.com/w3c/html/issues/694
|
||||
syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell
|
||||
syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'less') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("g:less_html_style_tags")
|
||||
let g:less_html_style_tags = 1
|
||||
endif
|
||||
|
||||
if !g:less_html_style_tags
|
||||
finish
|
||||
endif
|
||||
|
||||
" Unset (but preserve) so that less will run.
|
||||
if exists("b:current_syntax")
|
||||
let s:pre_less_cur_syn = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
" Inspired by code from github.com/kchmck/vim-coffee-script
|
||||
" and the html syntax file included with vim 7.4.
|
||||
|
||||
syn include @htmlLess syntax/less.vim
|
||||
|
||||
" We have to explicitly add to htmlHead (containedin) as that region specifies 'contains'.
|
||||
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
|
||||
|
||||
" Reset since 'less' isn't really the current_syntax.
|
||||
if exists("s:pre_less_cur_syn")
|
||||
let b:current_syntax = s:pre_less_cur_syn
|
||||
endif
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @GraphQLSyntax syntax/graphql.vim
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
let s:tags = '\%(' . join(g:graphql_javascript_tags, '\|') . '\)'
|
||||
|
||||
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend'
|
||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||
|
||||
" Support expression interpolation ((${...})) inside template strings.
|
||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
||||
|
||||
hi def link graphqlTemplateString jsTemplateString
|
||||
hi def link graphqlTaggedTemplate jsTaggedTemplate
|
||||
hi def link graphqlTemplateExpression jsTemplateExpression
|
||||
|
||||
syn cluster jsExpression add=graphqlTaggedTemplate
|
||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||
26
after/syntax/llvm.vim
Normal file
26
after/syntax/llvm.vim
Normal file
@@ -0,0 +1,26 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Copyright (c) 2018 rhysd
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in
|
||||
" all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
" THE SOFTWARE.
|
||||
|
||||
syn keyword llvmKeyword attributes
|
||||
syn match llvmNoName /#\d\+\>/
|
||||
@@ -1,26 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax = b:current_syntax
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @GraphQLSyntax syntax/graphql.vim
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax = s:current_syntax
|
||||
endif
|
||||
|
||||
let s:tags = '\%(' . join(g:graphql_javascript_tags, '\|') . '\)'
|
||||
|
||||
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,typescriptTemplateSubstitution extend'
|
||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||
|
||||
" Support expression interpolation ((${...})) inside template strings.
|
||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=typescriptTemplateSubstitution containedin=graphqlFold keepend
|
||||
|
||||
hi def link graphqlTemplateString typescriptTemplate
|
||||
hi def link graphqlTemplateExpression typescriptTemplateSubstitution
|
||||
|
||||
syn cluster typescriptExpression add=graphqlTaggedTemplate
|
||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||
@@ -37,21 +37,45 @@ function! s:run_cmd(cmd) abort
|
||||
return s:P.system(a:cmd)
|
||||
endfunction
|
||||
|
||||
function! s:find_root_by_spec(d) abort
|
||||
let dir = finddir('spec', a:d . ';')
|
||||
if dir ==# ''
|
||||
function! s:find_root_by(search_dir, d) abort
|
||||
let found_dir = finddir(a:search_dir, a:d . ';')
|
||||
if found_dir ==# ''
|
||||
return ''
|
||||
endif
|
||||
|
||||
" Note: ':h:h' for {root}/spec/ -> {root}/spec -> {root}
|
||||
return fnamemodify(dir, ':p:h:h')
|
||||
" Note: ':h:h' for {root}/{search_dir}/ -> {root}/{search_dir} -> {root}
|
||||
return fnamemodify(found_dir, ':p:h:h')
|
||||
endfunction
|
||||
|
||||
" Search the root directory containing a 'spec/' and a 'src/' directories.
|
||||
"
|
||||
" Searching for the 'spec/' directory is not enough: for example the crystal
|
||||
" compiler has a 'cr_sources/src/spec/' directory that would otherwise give the root
|
||||
" directory as 'cr_source/src/' instead of 'cr_sources/'.
|
||||
function! s:find_root_by_spec_and_src(d) abort
|
||||
" Search for 'spec/'
|
||||
let root = s:find_root_by('spec', a:d)
|
||||
" Check that 'src/' is also there
|
||||
if root !=# '' && isdirectory(root . '/src')
|
||||
return root
|
||||
endif
|
||||
|
||||
" Search for 'src/'
|
||||
let root = s:find_root_by('src', a:d)
|
||||
" Check that 'spec/' is also there
|
||||
if root !=# '' && isdirectory(root . '/spec')
|
||||
return root
|
||||
endif
|
||||
|
||||
" Cannot find a directory containing both 'src/' and 'spec/'
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! crystal_lang#entrypoint_for(file_path) abort
|
||||
let parent_dir = fnamemodify(a:file_path, ':p:h')
|
||||
let root_dir = s:find_root_by_spec(parent_dir)
|
||||
let root_dir = s:find_root_by_spec_and_src(parent_dir)
|
||||
if root_dir ==# ''
|
||||
" No spec diretory found. No need to make temporary file
|
||||
" No spec directory found. No need to make temporary file
|
||||
return a:file_path
|
||||
endif
|
||||
|
||||
@@ -232,7 +256,7 @@ endfunction
|
||||
|
||||
function! crystal_lang#run_all_spec(...) abort
|
||||
let path = a:0 == 0 ? expand('%:p:h') : a:1
|
||||
let root_path = s:find_root_by_spec(path)
|
||||
let root_path = s:find_root_by_spec_and_src(path)
|
||||
if root_path ==# ''
|
||||
return s:echo_error("'spec' directory is not found")
|
||||
endif
|
||||
@@ -250,9 +274,9 @@ function! crystal_lang#run_current_spec(...) abort
|
||||
let source_dir = fnamemodify(path, ':h')
|
||||
|
||||
" /foo/bar
|
||||
let root_dir = s:find_root_by_spec(source_dir)
|
||||
let root_dir = s:find_root_by_spec_and_src(source_dir)
|
||||
if root_dir ==# ''
|
||||
return s:echo_error("'spec' directory is not found")
|
||||
return s:echo_error("Root directory with 'src/' and 'spec/' not found")
|
||||
endif
|
||||
|
||||
" src
|
||||
|
||||
3191
autoload/csv.vim
Normal file
3191
autoload/csv.vim
Normal file
File diff suppressed because it is too large
Load Diff
24
autoload/db/adapter/ecto.vim
Normal file
24
autoload/db/adapter/ecto.vim
Normal file
@@ -0,0 +1,24 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:path = expand('<sfile>:h')
|
||||
let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')])
|
||||
|
||||
function! s:repo_list() abort
|
||||
return map(systemlist(s:cmd), 'split(v:val)')
|
||||
endfunction
|
||||
|
||||
function! db#adapter#ecto#canonicalize(url) abort
|
||||
for l:item in s:repo_list()
|
||||
let l:name = get(l:item, 0)
|
||||
let l:url = get(l:item, 1)
|
||||
if !empty(l:name) && 'ecto:'.l:name ==# a:url
|
||||
return l:url
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! db#adapter#ecto#complete_opaque(url) abort
|
||||
return map(s:repo_list(), 'v:val[0]')
|
||||
endfunction
|
||||
@@ -214,6 +214,12 @@ function! go#config#DebugCommands() abort
|
||||
return g:go_debug_commands
|
||||
endfunction
|
||||
|
||||
function! go#config#LspLog() abort
|
||||
" make sure g:go_lsp_log is set so that it can be added to easily.
|
||||
let g:go_lsp_log = get(g:, 'go_lsp_log', [])
|
||||
return g:go_lsp_log
|
||||
endfunction
|
||||
|
||||
function! go#config#SetDebugDiag(value) abort
|
||||
let g:go_debug_diag = a:value
|
||||
endfunction
|
||||
@@ -239,15 +245,27 @@ function! go#config#SetTemplateAutocreate(value) abort
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterCommand() abort
|
||||
return get(g:, "go_metalinter_command", "")
|
||||
return get(g:, "go_metalinter_command", "gometalinter")
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterAutosaveEnabled() abort
|
||||
return get(g:, 'go_metalinter_autosave_enabled', ['vet', 'golint'])
|
||||
let l:default_enabled = ["vet", "golint"]
|
||||
|
||||
if go#config#MetalinterCommand() == "golangci-lint"
|
||||
let l:default_enabled = ["govet", "golint"]
|
||||
endif
|
||||
|
||||
return get(g:, "go_metalinter_autosave_enabled", default_enabled)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterEnabled() abort
|
||||
return get(g:, "go_metalinter_enabled", ['vet', 'golint', 'errcheck'])
|
||||
let l:default_enabled = ["vet", "golint", "errcheck"]
|
||||
|
||||
if go#config#MetalinterCommand() == "golangci-lint"
|
||||
let l:default_enabled = ["govet", "golint"]
|
||||
endif
|
||||
|
||||
return get(g:, "go_metalinter_enabled", default_enabled)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterDisabled() abort
|
||||
@@ -448,7 +466,6 @@ function! go#config#EchoGoInfo() abort
|
||||
return get(g:, "go_echo_go_info", 1)
|
||||
endfunction
|
||||
|
||||
|
||||
" Set the default value. A value of "1" is a shortcut for this, for
|
||||
" compatibility reasons.
|
||||
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
|
||||
|
||||
@@ -234,6 +234,9 @@ function! rustfmt#Cmd()
|
||||
endfunction
|
||||
|
||||
function! rustfmt#PreWrite()
|
||||
if !filereadable(expand("%@"))
|
||||
return
|
||||
endif
|
||||
if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0)
|
||||
if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# ''
|
||||
let b:rustfmt_autosave = 1
|
||||
|
||||
34
autoload/smt2.vim
Normal file
34
autoload/smt2.vim
Normal file
@@ -0,0 +1,34 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'smt2') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Invokes the solver on current file
|
||||
function! smt2#RunSolver()
|
||||
silent !clear
|
||||
execute "!" . g:smt2_solver_command . " " . bufname("%")
|
||||
endfunction
|
||||
|
||||
" Puts the solver's output in new split (replaces old split)
|
||||
function! smt2#RunSolverAndShowResult()
|
||||
let output = system(g:smt2_solver_command . " " . bufname("%") . " 2>&1")
|
||||
|
||||
" Create split (or reuse existent)
|
||||
if exists("s:outputbufnr") && bufwinnr(s:outputbufnr) > 0
|
||||
execute bufwinnr(s:outputbufnr) . 'wincmd w'
|
||||
else
|
||||
silent! vnew
|
||||
let s:outputbufnr=bufnr('%')
|
||||
endif
|
||||
|
||||
" Clear & (re-)fill contents
|
||||
silent! normal! ggdG
|
||||
setlocal filetype=smt2 buftype=nofile nobuflisted noswapfile
|
||||
call append(0, split(output, '\v\n'))
|
||||
normal! gg
|
||||
endfunction
|
||||
|
||||
" Requests the solver's version
|
||||
function! smt2#PrintSolverVersion()
|
||||
silent !clear
|
||||
execute "!" . g:smt2_solver_command . " " . g:smt2_solver_version_switch
|
||||
endfunction
|
||||
14
build
14
build
@@ -9,6 +9,8 @@ DIRS_BASIC="syntax compiler indent after/syntax after/indent"
|
||||
DIRS_ALL="syntax indent compiler autoload ftplugin after"
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_SYNTAX="syntax indent after/syntax after/indent"
|
||||
# shellcheck disable=SC2034
|
||||
DIRS_NOAFTER="syntax compiler indent autoload ftplugin"
|
||||
DIRS_JAVASCRIPT="${DIRS} extras"
|
||||
read -r -a DIRS_RM <<<"$DIRS_JAVASCRIPT"
|
||||
|
||||
@@ -151,6 +153,7 @@ update_readme() {
|
||||
}
|
||||
|
||||
PACKS="
|
||||
acpiasl:martinlroth/vim-acpi-asl
|
||||
ansible:pearofducks/ansible-vim
|
||||
apiblueprint:sheerun/apiblueprint.vim
|
||||
applescript:mityu/vim-applescript:_SYNTAX
|
||||
@@ -165,10 +168,11 @@ PACKS="
|
||||
cjsx:mtscout6/vim-cjsx
|
||||
clojure:guns/vim-clojure-static
|
||||
cmake:pboettch/vim-cmake-syntax
|
||||
coffee-script:kchmck/vim-coffee-script
|
||||
coffee-script:kchmck/vim-coffee-script:_NOAFTER
|
||||
cql:elubow/cql-vim
|
||||
cryptol:victoredwardocallaghan/cryptol.vim
|
||||
crystal:rhysd/vim-crystal
|
||||
csv:chrisbra/csv.vim
|
||||
cucumber:tpope/vim-cucumber
|
||||
cue:mgrabovsky/vim-cuesheet
|
||||
dart:dart-lang/dart-vim-plugin
|
||||
@@ -183,12 +187,11 @@ PACKS="
|
||||
flatbuffers:dcharbon/vim-flatbuffers
|
||||
fsharp:fsharp/vim-fsharp:_BASIC
|
||||
git:tpope/vim-git
|
||||
glsl:tikhomirov/vim-glsl
|
||||
glsl:tikhomirov/vim-glsl:_NOAFTER
|
||||
gmpl:maelvalais/gmpl.vim
|
||||
gnuplot:vim-scripts/gnuplot-syntax-highlighting
|
||||
go:fatih/vim-go:_BASIC
|
||||
gradle:tfnico/vim-gradle
|
||||
graphql:jparise/vim-graphql
|
||||
groovy:vim-scripts/groovy.vim
|
||||
groovy-indent:vim-scripts/groovyindent-unix
|
||||
haml:sheerun/vim-haml
|
||||
@@ -210,9 +213,11 @@ PACKS="
|
||||
julia:JuliaEditorSupport/julia-vim
|
||||
kotlin:udalov/kotlin-vim
|
||||
latex:LaTeX-Box-Team/LaTeX-Box
|
||||
less:groenewege/vim-less
|
||||
less:groenewege/vim-less:_NOAFTER
|
||||
liquid:tpope/vim-liquid
|
||||
lilypond:anowlcalledjosh/vim-lilypond
|
||||
livescript:gkz/vim-ls
|
||||
llvm:rhysd/vim-llvm
|
||||
lua:tbastos/vim-lua
|
||||
mako:sophacles/vim-bundle-mako
|
||||
markdown:plasticboy/vim-markdown:_SYNTAX
|
||||
@@ -256,6 +261,7 @@ PACKS="
|
||||
scss:cakebaker/scss-syntax.vim
|
||||
slim:slim-template/vim-slim
|
||||
slime:slime-lang/vim-slime-syntax
|
||||
smt2:bohlender/vim-smt2
|
||||
solidity:tomlion/vim-solidity
|
||||
stylus:wavded/vim-stylus
|
||||
swift:keith/swift.vim
|
||||
|
||||
23
compiler/lilypond.vim
Normal file
23
compiler/lilypond.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond compiler file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2004 Mar 01
|
||||
"
|
||||
" Installed As: vim/compiler/lilypond.vim
|
||||
"
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "lilypond"
|
||||
|
||||
" default make
|
||||
setlocal makeprg=lilypond\ $*
|
||||
" errorformat for lily (with columns) and gcc
|
||||
" (how to see multiple-line error messages?)
|
||||
setlocal errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m
|
||||
"
|
||||
@@ -3,6 +3,14 @@ if !exists('g:jsx_ext_required')
|
||||
let g:jsx_ext_required = 0
|
||||
endif
|
||||
|
||||
" Make csv loading faster
|
||||
if !exists('g:csv_start')
|
||||
let g:csv_start = 1
|
||||
endif
|
||||
if !exists('g:csv_end')
|
||||
let g:csv_end = 2
|
||||
endif
|
||||
|
||||
" Disable json concealing by default
|
||||
if !exists('g:vim_json_syntax_conceal')
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
|
||||
@@ -10,7 +10,7 @@ syntax match jsDocTags contained "@\(alias\|api\|augments\|borrows\|cla
|
||||
" tags containing type and param
|
||||
syntax match jsDocTags contained "@\(arg\|argument\|cfg\|param\|property\|prop\|typedef\)\>" skipwhite nextgroup=jsDocType
|
||||
" tags containing type but no param
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|return\|returns\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|return\|returns\|yields\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
" tags containing references
|
||||
syntax match jsDocTags contained "@\(lends\|see\|tutorial\)\>" skipwhite nextgroup=jsDocSeeTag
|
||||
" other tags (no extra syntax)
|
||||
|
||||
@@ -3,6 +3,14 @@ if !exists('g:jsx_ext_required')
|
||||
let g:jsx_ext_required = 0
|
||||
endif
|
||||
|
||||
" Make csv loading faster
|
||||
if !exists('g:csv_start')
|
||||
let g:csv_start = 1
|
||||
endif
|
||||
if !exists('g:csv_end')
|
||||
let g:csv_end = 2
|
||||
endif
|
||||
|
||||
" Disable json concealing by default
|
||||
if !exists('g:vim_json_syntax_conceal')
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
@@ -80,6 +88,14 @@ augroup END
|
||||
if (!exists('g:graphql_javascript_tags'))
|
||||
let g:graphql_javascript_tags = ['gql', 'graphql', 'Relay.QL']
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acpiasl') == -1
|
||||
augroup filetypedetect
|
||||
" acpiasl, from asl.vim in martinlroth/vim-acpi-asl
|
||||
au BufRead,BufNewFile *.asl set filetype=asl
|
||||
au BufRead,BufNewFile *.dsl set filetype=asl
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
|
||||
augroup filetypedetect
|
||||
" ansible, from ansible.vim in pearofducks/ansible-vim
|
||||
@@ -241,6 +257,14 @@ autocmd BufNewFile,BufReadPost *.ecr setlocal filetype=eruby
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1
|
||||
augroup filetypedetect
|
||||
" csv, from csv.vim in chrisbra/csv.vim
|
||||
" Install Filetype detection for CSV files
|
||||
au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1
|
||||
augroup filetypedetect
|
||||
" cucumber, from cucumber.vim in tpope/vim-cucumber
|
||||
@@ -365,7 +389,7 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1
|
||||
augroup filetypedetect
|
||||
" glsl, from glsl.vim in tikhomirov/vim-glsl
|
||||
" glsl, from glsl.vim in tikhomirov/vim-glsl:_NOAFTER
|
||||
" Language: OpenGL Shading Language
|
||||
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>
|
||||
|
||||
@@ -438,14 +462,6 @@ au BufNewFile,BufRead *.gradle set filetype=groovy
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||
augroup filetypedetect
|
||||
" graphql, from graphql.vim in jparise/vim-graphql
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
au BufRead,BufNewFile *.graphql,*.graphqls,*.gql setfiletype graphql
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1
|
||||
augroup filetypedetect
|
||||
" haml, from haml.vim in sheerun/vim-haml
|
||||
@@ -640,7 +656,7 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1
|
||||
augroup filetypedetect
|
||||
" less, from less.vim in groenewege/vim-less
|
||||
" less, from less.vim in groenewege/vim-less:_NOAFTER
|
||||
autocmd BufNewFile,BufRead *.less setf less
|
||||
augroup end
|
||||
endif
|
||||
@@ -667,6 +683,16 @@ au BufNewFile,BufRead */templates/**.liquid,*/layout/**.liquid,*/snippets/**.liq
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1
|
||||
augroup filetypedetect
|
||||
" lilypond, from lilypond.vim in anowlcalledjosh/vim-lilypond
|
||||
"
|
||||
" Installed As: vim/ftdetect/lilypond.vim
|
||||
"
|
||||
au! BufNewFile,BufRead *.ly,*.ily set ft=lilypond
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1
|
||||
augroup filetypedetect
|
||||
" livescript, from ls.vim in gkz/vim-ls
|
||||
@@ -680,6 +706,27 @@ autocmd BufNewFile,BufRead *Slakefile set filetype=ls
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
||||
augroup filetypedetect
|
||||
" llvm, from llvm-lit.vim in rhysd/vim-llvm
|
||||
au BufRead,BufNewFile lit.*cfg set filetype=python
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
||||
augroup filetypedetect
|
||||
" llvm, from llvm.vim in rhysd/vim-llvm
|
||||
au BufRead,BufNewFile *.ll set filetype=llvm
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
||||
augroup filetypedetect
|
||||
" llvm, from tablegen.vim in rhysd/vim-llvm
|
||||
au BufRead,BufNewFile *.td set filetype=tablegen
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
|
||||
augroup filetypedetect
|
||||
" mako, from mako.vim in sophacles/vim-bundle-mako
|
||||
@@ -786,8 +833,8 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||
augroup filetypedetect
|
||||
" ocaml, from jbuild.vim in rgrinberg/vim-ocaml
|
||||
au BufRead,BufNewFile jbuild,dune,dune-project set ft=jbuild
|
||||
" ocaml, from dune.vim in rgrinberg/vim-ocaml
|
||||
au BufRead,BufNewFile jbuild,dune,dune-project set ft=dune
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1170,7 +1217,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||
" vint: -ProhibitAutocmdWithNoGroup
|
||||
|
||||
autocmd BufRead,BufNewFile *.rs setf rust
|
||||
autocmd BufRead,BufNewFile Cargo.toml if &filetype == "" | set filetype=cfg | endif
|
||||
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
augroup end
|
||||
@@ -1210,6 +1257,13 @@ autocmd BufNewFile,BufRead *.slime set filetype=slime
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1
|
||||
augroup filetypedetect
|
||||
" smt2, from smt2.vim in bohlender/vim-smt2
|
||||
autocmd BufRead,BufNewFile *.smt,*.smt2 set filetype=smt2
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1
|
||||
augroup filetypedetect
|
||||
" solidity, from solidity.vim in tomlion/vim-solidity
|
||||
|
||||
38
ftplugin/csv.vim
Normal file
38
ftplugin/csv.vim
Normal file
@@ -0,0 +1,38 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'csv') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Filetype plugin for editing CSV files. "{{{1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Version: 0.31
|
||||
" Script: http://www.vim.org/scripts/script.php?script_id=2830
|
||||
" License: VIM License
|
||||
" Last Change: Thu, 15 Jan 2015 21:05:10 +0100
|
||||
" Documentation: see :help ft-csv.txt
|
||||
" GetLatestVimScripts: 2830 30 :AutoInstall: csv.vim
|
||||
"
|
||||
" Some ideas are taken from the wiki http://vim.wikia.com/wiki/VimTip667
|
||||
" though, implementation differs.
|
||||
|
||||
" Plugin folklore "{{{1
|
||||
if v:version < 700 || exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Initialize Plugin "{{{2
|
||||
" useful for configuring how many lines to analyze,
|
||||
" set if you notice a slowdown
|
||||
let b:csv_start = get(g:, 'csv_start', 1)
|
||||
let b:csv_end = get(g:, 'csv_end', line('$'))
|
||||
let b:csv_result = ''
|
||||
|
||||
call csv#Init(b:csv_start, b:csv_end)
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" Vim Modeline " {{{2
|
||||
" vim: set foldmethod=marker et sw=0 sts=-1 ts=4:
|
||||
@@ -17,8 +17,10 @@ let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q
|
||||
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<'
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
|
||||
setlocal formatlistpat+=\\\|^\\s*[-*+]\\s\\+
|
||||
|
||||
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms< formatlistpat<'
|
||||
|
||||
if exists("g:no_gitcommit_commands") || v:version < 700
|
||||
finish
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if (exists('b:did_ftplugin'))
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t
|
||||
setlocal iskeyword+=$,@-@
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal expandtab
|
||||
|
||||
let b:undo_ftplugin = 'setlocal com< cms< fo< isk< sts< sw< et<'
|
||||
61
ftplugin/lilypond.vim
Normal file
61
ftplugin/lilypond.vim
Normal file
@@ -0,0 +1,61 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond filetype plugin
|
||||
" Language: LilyPond (ft=ly)
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/ftplugin/lilypond.vim
|
||||
" Uses Generated File: vim/syntax/lilypond-words.vim
|
||||
"
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal shiftwidth=2
|
||||
"
|
||||
" some handy key mappings
|
||||
"
|
||||
" <F4> save & make and play midi with timidity
|
||||
map <buffer> <F4> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>:!timidity "%<.midi"<Return>
|
||||
"
|
||||
" <F5> save & make
|
||||
map <buffer> <F5> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>
|
||||
"
|
||||
" <F6> view ps with ghostview
|
||||
map <buffer> <F6> :!gv --watch "%<.ps" &<Return>
|
||||
"
|
||||
" <F7> prev error
|
||||
map <buffer> <F7> :cp<Return>
|
||||
"
|
||||
" <F8> next error
|
||||
map <buffer> <F8> :cn<Return>
|
||||
"
|
||||
" <F9> make
|
||||
map <buffer> <F9> :w<Return>:se makeprg=make\ -k<Return>:make<Return>
|
||||
"
|
||||
" <F10> menu
|
||||
source $VIMRUNTIME/menu.vim
|
||||
setlocal wildmenu
|
||||
setlocal cpo-=<
|
||||
setlocal wcm=<C-Z>
|
||||
map <buffer> <F10> :emenu <C-Z>
|
||||
"
|
||||
" <F12> comment region
|
||||
map <buffer> <F12> :g!/%.*/normal 0i%<Return>
|
||||
"
|
||||
" <S-F12> remove comments in region
|
||||
map <buffer> <S-F12> :g/%.*/normal 0x<Return>
|
||||
"
|
||||
" Completions in Insert/Replace-mode with <Ctrl-N>
|
||||
setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond-words
|
||||
setlocal complete-=k complete+=k
|
||||
"
|
||||
setlocal showmatch
|
||||
16
ftplugin/llvm.vim
Normal file
16
ftplugin/llvm.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: LLVM Assembly
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal softtabstop=2 shiftwidth=2
|
||||
setlocal expandtab
|
||||
setlocal comments+=:;
|
||||
@@ -27,13 +27,13 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
let b:match_words =
|
||||
\ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|=\@<!begin\)\>=\@!' .
|
||||
\ '{\|\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|=\@<!begin\)\>=\@!' .
|
||||
\ ':' .
|
||||
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
|
||||
\ ':' .
|
||||
\ '\%(^\|[^.\:@$=]\)\@<=\<end\:\@!\>' .
|
||||
\ '}\|\%(^\|[^.\:@$=]\)\@<=\<end\:\@!\>' .
|
||||
\ ',^=begin\>:^=end\>,' .
|
||||
\ ',{:},\[:\],(:)'
|
||||
\ ',\[:\],(:)'
|
||||
|
||||
let b:match_skip =
|
||||
\ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
|
||||
|
||||
29
ftplugin/smt2.vim
Normal file
29
ftplugin/smt2.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'smt2') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword+=-,:,#,',$
|
||||
|
||||
" If no command for invoking a solver is specified in ~/.vimrc, test if either
|
||||
" 'z3' or 'boolector' is accessible through $PATH (in that order)
|
||||
if !exists("g:smt2_solver_command")
|
||||
if executable("z3")
|
||||
let g:smt2_solver_command = "z3"
|
||||
elseif executable("boolector")
|
||||
let g:smt2_solver_command = "boolector"
|
||||
endif
|
||||
endif
|
||||
|
||||
" If no command line switch for printing the solver's version is specified in
|
||||
" ~/.vimrc, use '--version'
|
||||
if !exists("g:smt2_solver_version_switch")
|
||||
let g:smt2_solver_version_switch = "--version"
|
||||
endif
|
||||
|
||||
" Mappings
|
||||
nnoremap <silent> <buffer> <localleader>r :call smt2#RunSolver()<cr>
|
||||
nnoremap <silent> <buffer> <localleader>R :call smt2#RunSolverAndShowResult()<cr>
|
||||
nnoremap <silent> <buffer> <localleader>v :call smt2#PrintSolverVersion()<cr>
|
||||
|
||||
" Comment String
|
||||
setlocal commentstring=;%s
|
||||
16
ftplugin/tablegen.vim
Normal file
16
ftplugin/tablegen.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: LLVM TableGen
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
setlocal softtabstop=2 shiftwidth=2
|
||||
setlocal expandtab
|
||||
@@ -12,7 +12,7 @@ if exists("g:loaded_terraform") || v:version < 700 || &cp || !executable('terraf
|
||||
endif
|
||||
let g:loaded_terraform = 1
|
||||
|
||||
if !exists("g:terraform_fmt_on_save")
|
||||
if !exists("g:terraform_fmt_on_save") || !filereadable(expand("%:p"))
|
||||
let g:terraform_fmt_on_save = 0
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal nocindent
|
||||
setlocal nolisp
|
||||
setlocal nosmartindent
|
||||
|
||||
setlocal indentexpr=GetGraphQLIndent()
|
||||
setlocal indentkeys=0{,0},0),0[,0],0#,!^F,o,O
|
||||
|
||||
" If our indentation function already exists, we have nothing more to do.
|
||||
if exists('*GetGraphQLIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
" Check if the character at lnum:col is inside a string.
|
||||
function s:InString(lnum, col)
|
||||
return synIDattr(synID(a:lnum, a:col, 1), 'name') is# 'graphqlString'
|
||||
endfunction
|
||||
|
||||
function GetGraphQLIndent()
|
||||
" If this is the first non-blank line, we have nothing more to do because
|
||||
" all of our indentation rules are based on matching against earlier lines.
|
||||
let l:prevlnum = prevnonblank(v:lnum - 1)
|
||||
if l:prevlnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:line = getline(v:lnum)
|
||||
|
||||
" If this line contains just a closing bracket, find its matching opening
|
||||
" bracket and indent the closing backet to match.
|
||||
let l:col = matchend(l:line, '^\s*[]})]')
|
||||
if l:col > 0 && !s:InString(v:lnum, l:col)
|
||||
let l:bracket = l:line[l:col - 1]
|
||||
call cursor(v:lnum, l:col)
|
||||
|
||||
if l:bracket is# '}'
|
||||
let l:matched = searchpair('{', '', '}', 'bW')
|
||||
elseif l:bracket is# ']'
|
||||
let l:matched = searchpair('\[', '', '\]', 'bW')
|
||||
elseif l:bracket is# ')'
|
||||
let l:matched = searchpair('(', '', ')', 'bW')
|
||||
else
|
||||
let l:matched = -1
|
||||
endif
|
||||
|
||||
return l:matched > 0 ? indent(l:matched) : virtcol('.') - 1
|
||||
endif
|
||||
|
||||
" If we're inside of a multiline string, continue with the same indentation.
|
||||
if s:InString(v:lnum, matchend(l:line, '^\s*') + 1)
|
||||
return indent(v:lnum)
|
||||
endif
|
||||
|
||||
" If the previous line contained an opening bracket, and we are still in it,
|
||||
" add indent depending on the bracket type.
|
||||
if getline(l:prevlnum) =~# '[[{(]\s*$'
|
||||
return indent(l:prevlnum) + shiftwidth()
|
||||
endif
|
||||
|
||||
" Default to the existing indentation level.
|
||||
return indent(l:prevlnum)
|
||||
endfunction
|
||||
|
||||
let &cpoptions = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
64
indent/lilypond.vim
Normal file
64
indent/lilypond.vim
Normal file
@@ -0,0 +1,64 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond indent file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/indent/lilypond.vim
|
||||
"
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetLilyPondIndent()
|
||||
setlocal indentkeys=o,O,},>>,!^F
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetLilyPondIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetLilyPondIndent()
|
||||
if v:lnum == 1
|
||||
return 0
|
||||
endif
|
||||
|
||||
"Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
"Check if a block was started: '{' or '<<' is the last non-blank character of the previous line.
|
||||
if getline(lnum) =~ '^.*\({\|<<\)\s*$'
|
||||
let ind = indent(lnum) + &sw
|
||||
else
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
"Check if a block was ended: '}' or '>>' is the first non-blank character of the current line.
|
||||
if getline(v:lnum) =~ '^\s*\(}\|>>\)'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
" Check if the first character from the previous line is within
|
||||
" a `lilyScheme' region, and if so, use lisp-style indentation
|
||||
" for the current line.
|
||||
"
|
||||
" TODO:
|
||||
" - Only works in version 7.1.215 or later, though it should
|
||||
" silently fail in older versions.
|
||||
" - We should support `lilyScheme' regions that begin in the
|
||||
" middle of the line, too.
|
||||
for id in synstack(lnum, 1)
|
||||
if synIDattr(id, "name") == "lilyScheme"
|
||||
let ind = lispindent(v:lnum)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
"
|
||||
"
|
||||
"
|
||||
76
indent/llvm.vim
Normal file
76
indent/llvm.vim
Normal file
@@ -0,0 +1,76 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim indent file
|
||||
" Language: llvm
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
" What this indent plugin currently does:
|
||||
" - If no other rule matches copy indent from previous non-empty,
|
||||
" non-commented line
|
||||
" - On '}' align the same as the line containing the matching '{'
|
||||
" - If previous line ends with ':' increase indentation
|
||||
" - If the current line ends with ':' indent at the same level as the
|
||||
" enclosing '{'/'}' block
|
||||
" Stuff that would be nice to add:
|
||||
" - Continue comments on next line
|
||||
" - If there is an opening+unclosed parenthesis on previous line indent to that
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal shiftwidth=2 expandtab
|
||||
|
||||
setlocal indentkeys=0{,0},<:>,!^F,o,O,e
|
||||
setlocal indentexpr=GetLLVMIndent()
|
||||
|
||||
if exists("*GetLLVMIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! FindOpenBrace(lnum)
|
||||
call cursor(a:lnum, 1)
|
||||
return searchpair('{', '', '}', 'bW')
|
||||
endfun
|
||||
|
||||
function! GetLLVMIndent()
|
||||
" On '}' align the same as the line containing the matching '{'
|
||||
let thisline = getline(v:lnum)
|
||||
if thisline =~ '^\s*}'
|
||||
call cursor(v:lnum, 1)
|
||||
silent normal %
|
||||
let opening_lnum = line('.')
|
||||
if opening_lnum != v:lnum
|
||||
return indent(opening_lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Indent labels the same as the current opening block
|
||||
if thisline =~ ':\s*$'
|
||||
let blockbegin = FindOpenBrace(v:lnum)
|
||||
if blockbegin > 0
|
||||
return indent(blockbegin)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Find a non-blank not-completely commented line above the current line.
|
||||
let prev_lnum = prevnonblank(v:lnum - 1)
|
||||
while prev_lnum > 0 && synIDattr(synID(prev_lnum, indent(prev_lnum)+1, 0), "name") =? "string\|comment"
|
||||
let prev_lnum = prevnonblank(prev_lnum-1)
|
||||
endwhile
|
||||
" Hit the start of the file, use zero indent.
|
||||
if prev_lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(prev_lnum)
|
||||
let prevline = getline(prev_lnum)
|
||||
|
||||
" Add a 'shiftwidth' after lines that start a block or labels
|
||||
if prevline =~ '{\s*$' || prevline =~ ':\s*$'
|
||||
let ind = ind + &shiftwidth
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
@@ -1,8 +0,0 @@
|
||||
$plugin_path = File.expand_path('../..', __FILE__)
|
||||
|
||||
describe 'build script' do
|
||||
it 'should run and return success code' do
|
||||
Dir.chdir($plugin_path)
|
||||
expect(system('bash ./build')).to be_true
|
||||
end
|
||||
end
|
||||
@@ -10,12 +10,14 @@ describe "My Vim plugin" do
|
||||
extensions = extensions.split(/[\n,]/)
|
||||
|
||||
extensions.each do |ext|
|
||||
it "should parse #{ext} file" do
|
||||
Timeout::timeout(15) do
|
||||
write_file "#{ext}", ""
|
||||
vim.edit "#{ext}"
|
||||
vim.insert "sample"
|
||||
vim.write
|
||||
if ext.match?(/^[a-z\.]+$/i)
|
||||
it "should parse #{ext} file" do
|
||||
Timeout::timeout(20) do
|
||||
write_file "#{ext}", ""
|
||||
vim.edit "#{ext}"
|
||||
vim.insert "sample"
|
||||
vim.write
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,9 +4,7 @@ require 'vimrunner/rspec'
|
||||
$plugin_path = File.expand_path('../..', __FILE__)
|
||||
|
||||
Vimrunner::RSpec.configure do |config|
|
||||
# Use a single Vim instance for the test suite. Set to false to use an
|
||||
# instance per test (slower, but can be easier to manage).
|
||||
config.reuse_server = !ENV['REUSE_SERVER'].nil?
|
||||
config.reuse_server = true
|
||||
|
||||
# Decide how to start a Vim instance. In this block, an instance should be
|
||||
# spawned and set up with anything project-specific.
|
||||
|
||||
112
syntax/asl.vim
Normal file
112
syntax/asl.vim
Normal file
@@ -0,0 +1,112 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'acpiasl') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: ACPI ASL files
|
||||
" Maintainer: Martin L Roth <gaumless@gmail.com>
|
||||
" Version: 0.1
|
||||
|
||||
" Currently supporting ACPI 5.0 and IASL preprocessor
|
||||
" http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf
|
||||
" https://acpica.org/sites/acpica/files/aslcompiler_8.pdf
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:current_syntax = "asl"
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn region aslBlock start="{" end="}" transparent fold
|
||||
|
||||
syn keyword aslTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn region aslComment display start="//" skip="\\$" end="$" keepend contains=aslTodo
|
||||
syn region aslComment start="/\*" end="\*\/" contains=aslTodo
|
||||
|
||||
syn region aslString start=/"/ skip=/\\"/ end=/"/
|
||||
|
||||
" Keywords
|
||||
syn keyword aslPrimaryKeyword AccessAs Acquire Add Alias And Arg0 Arg1 Arg2 Arg3 Arg4 Arg6 Arg6
|
||||
syn keyword aslPrimaryKeyword BankField BreakPoint Break Buffer
|
||||
syn keyword aslPrimaryKeyword Case ConcatenateResTemplate Concatenate Connection CondRefOf Continue CopyObject CreateBitField CreateByteField CreateDWordField CreateField CreateQWordField CreateWordField
|
||||
syn keyword aslPrimaryKeyword DataTableRegion Debug Decrement Default DefinitionBlock DerefOf Device Divide
|
||||
syn keyword aslPrimaryKeyword EISAID EisaId ElseIf Else Event External
|
||||
syn keyword aslPrimaryKeyword Fatal Field FindSetLeftBit FindSetRightBit FromBCD Function
|
||||
syn keyword aslPrimaryKeyword If Include Increment IndexField Index
|
||||
syn keyword aslPrimaryKeyword LAnd LEqual LGreaterEqual LGreater LLessEqual LLess LNotEqual LNot LoadTable Load Local0 Local1 Local2 Local3 Local4 Local5 Local6 Local7 LOr
|
||||
syn keyword aslPrimaryKeyword Match Method Mid Mod Multiply Mutex
|
||||
syn keyword aslPrimaryKeyword Name NAnd NoOp NOr Notify Not
|
||||
syn keyword aslPrimaryKeyword ObjectType Offset OperationRegion Or
|
||||
syn keyword aslPrimaryKeyword Package PowerResource Processor
|
||||
syn keyword aslPrimaryKeyword RawDataBuffer RefOf Release Reset ResourceTemplate Return
|
||||
syn keyword aslPrimaryKeyword Scope ShiftLeft ShiftRight Signal SizeOf Sleep Stall Store Subtract Switch
|
||||
syn keyword aslPrimaryKeyword ThermalZone Timer ToBCD ToBuffer ToDecimalString ToHexString ToInteger ToString ToUUID
|
||||
syn keyword aslPrimaryKeyword Unicode Unload
|
||||
syn keyword aslPrimaryKeyword Wait While
|
||||
syn keyword aslPrimaryKeyword XOr
|
||||
|
||||
syn keyword aslParameterKeyword ActiveBoth ActiveHigh ActiveHigh ActiveLow ActiveLow AddressingMode10Bit AddressingMode7Bit AddressRangeACPI AddressRangeMemory AddressRangeNVS AddressRangeReserved AnyAcc AttribBlock AttribBlockProcessCall AttribByte AttribBytes AttribBytes AttribProcessCall AttribQuick AttribRawBytes AttribRawBytes AttribRawProcessBytes AttribRawProcessBytes AttribSendReceive AttribWord
|
||||
syn keyword aslParameterKeyword BigEndianing BufferAcc BuffFieldObj BuffObj BusMaster ByteAcc
|
||||
syn keyword aslParameterKeyword Cacheable ClockPhaseFirst ClockPhaseSecond ClockPolarityHigh ClockPolarityLow Compatibility ControllerInitiated
|
||||
syn keyword aslParameterKeyword DataBitsEight DataBitsFive DataBitsNine DataBitsSeven DataBitsSix DDBHandleObj Decode10 Decode16 DenseTranslation DeviceInitiated DeviceObj DWordAcc
|
||||
syn keyword aslParameterKeyword Edge EmbeddedControl EntireRange EventObj Exclusive ExclusiveAndWake
|
||||
syn keyword aslParameterKeyword FFixedHW FieldUnitObj FlowControlHardware FlowControlNone FlowControlXon FourWireMode
|
||||
syn keyword aslParameterKeyword GeneralPurposeIO GenericSerialBus
|
||||
syn keyword aslParameterKeyword IntObj IoRestrictionInputOnly IoRestrictionNone IoRestrictionNoneAndPreserve IoRestrictionOutputOnly IPMI ISAOnlyRanges
|
||||
syn keyword aslParameterKeyword Level LittleEndian Lock
|
||||
syn keyword aslParameterKeyword MaxFixed MaxNotFixed MEQ MethodObj MGE MGT MinFixed MinNotFixed MLE MLT MTR MutexObj
|
||||
syn keyword aslParameterKeyword NoLock NonCacheable NonISAOnlyRanges NotBusMaster NotSerialized
|
||||
syn keyword aslParameterKeyword OpRegionObj
|
||||
syn keyword aslParameterKeyword ParityTypeEven ParityTypeMark ParityTypeNone ParityTypeOdd ParityTypeSpace PCC PciBarTarget PCI_Config PkgObj PolarityHigh PolarityLow PosDecode PowerResObj Prefetchable Preserve ProcessorObj PullDefault PullDown PullNone PullUp
|
||||
syn keyword aslParameterKeyword QWordAcc
|
||||
syn keyword aslParameterKeyword ReadOnly ReadWrite RegionSpaceKeyword ResourceConsumer ResourceProducer
|
||||
syn keyword aslParameterKeyword Serialized Shared SharedAndWake SMBus SparseTranslation StopBitsOne StopBitsOnePlusHalf StopBitsTwo StopBitsZero StrObj SubDecode SystemCMOS SystemIO SystemMemory
|
||||
syn keyword aslParameterKeyword ThermalZoneObj ThreeWireMode Transfer16 Transfer8 Transfer8_16 TypeA TypeB TypeF TypeStatic TypeTranslation
|
||||
syn keyword aslParameterKeyword UnknownObj UserDefRegionSpace
|
||||
syn keyword aslParameterKeyword Width128Bit Width16Bit Width256Bit Width32Bit Width64Bit Width8Bit WordAcc WriteAsOnes WriteAsZeros WriteCombining
|
||||
|
||||
syn keyword aslResourceKeyword DMA DWordIO DWordMemory DWordSpace
|
||||
syn keyword aslResourceKeyword EndDependentFn ExtendedIO ExtendedMemory ExtendedSpace
|
||||
syn keyword aslResourceKeyword FixedDMA FixedIO
|
||||
syn keyword aslResourceKeyword GpioInt GpioIO
|
||||
syn keyword aslResourceKeyword I2CSerialBus Interrupt IO IRQNoFlags IRQ
|
||||
syn keyword aslResourceKeyword Memory24 Memory32Fixed Memory32
|
||||
syn keyword aslResourceKeyword QWordIO QWordMemory QWordSpace
|
||||
syn keyword aslResourceKeyword RawDataBuffer Register
|
||||
syn keyword aslResourceKeyword SPISerialBus StartDependentFnNoPri StartDependentFn
|
||||
syn keyword aslResourceKeyword UARTSerialBus
|
||||
syn keyword aslResourceKeyword VendorLong VendorShort
|
||||
syn keyword aslResourceKeyword WordBusNumber WordIO WordSpace
|
||||
|
||||
" Pre-defined object names
|
||||
syn keyword aslObjects _AC0 _AC1 _AC2 _AC3 _AC4 _AC5 _AC6 _AC7 _AC8 _AC9 _ADR _ALC _ALI _ALN _APL _ALR _ALT _AL0 _AL1 _AL2 _AL3 _AL4 _AL5 _AL6 _AL7 _AL8 _AL9 _ART _ASI _ASZ _ATT _BAS _BBN _BCL _BCM _BCT _BDN _BFS _BIF _BIX _BLT _BM _BMA _BMC _BMD _MBS _BQC _BST _BTM _BTP _CBA _CDM _CID _CRS _CRT _CSD _CST _CWS _DBT _DCK _DCS _DDC _DDN _DEC _DGS _DIS _DLM _DMA _DOD _DOS _DPL _DRS _DSM _DSS _DSW _DTI _EC _EDL _EJD _END _EVT _FDE _FDI _FDM _FIF _FIX _FLC _FPS _FSL _FST _GAI _GCP _GHL _GL _GLK _GPD _GPE _GRA _GRT _GSB _GTF _GTM _GTS _GWS _HE _HID _HOT _HPP _HPX _HRV _IFT _INI _INT _IOR _IRC _LCK _LEN _LID _LIN _LL _MAF _MAT _MAX _MBM _MEM _MIF _MIN _MLS _MOD _MSG _MSM _MTP _NTT _OFF _ON _OS _OSC _OSI _OST _PAI _PAR _PCL _PCT _PDC _PDL _PHA _PIC _PIF _PIN _PLD _PMC _PMD _PMM _POL _PPC _PPE _PPI _PR _PR0 _PR1 _PR2 _PR3 _PRE _PRL _PRS _PRT _PRW _PS0 _PS1 _PS2 _PS3 _PSC _PSD _PSE _PSL _PSR _PSS _PSV _PSW _PTC _PTP _PTS _PUR _PXM _RBO _RBW _REG _REV _RMV _RNG _ROM _RT _RTV _RW _RXL _S0 _S1 _S2 _S3 _S4 _S4 _S1D _S2D _S3D _S4D _S0W _S1W _S2W _S3W _S4W _SB _SBS _SCP _SDD _SEG _SHL _SHR _SI _SIZ _SLI _SLV _SPD _SPE _SRS _SRT _SRV _SST _STA _STB _STM _STP _STR _STV _SUN _SWS _TC2 _TC2 _TDL _TIP _TIV _TMP _TPC _TPT _TRA _TRS _TRT _TSD _TSF _TSP _TSS _TST _TTP _TXL _TTS _TYP _TZ _TZD _TZM _TZP _UID _UPC _UPD _UPP _VPO _VEN _WAK
|
||||
|
||||
" IASL Preprocessor: #define #elif #else #endif #error #if #ifdef #ifndef #include #line #undef
|
||||
syn region aslPreProc start="^\s*\(%:\|#\)\s*\(include\)\>" skip="\\$" end="$" keepend
|
||||
syn region aslPreProc start="^\s*\(%:\|#\)\s*\(error\|line\|define\|undef\|if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=ALL
|
||||
syn match aslPreProcMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
|
||||
" Numeric values and Zero / One keywords
|
||||
syn keyword aslZeroOne Zero One
|
||||
syn match aslNumber display "\<\d\+"
|
||||
syn match aslNumber display "0x\x\+"
|
||||
|
||||
" Set the default colors
|
||||
hi def link aslTodo Todo
|
||||
hi def link aslComment Comment
|
||||
hi def link aslString String
|
||||
hi def link aslPrimaryKeyword Keyword
|
||||
hi def link aslParameterKeyword Macro
|
||||
hi def link aslResourceKeyword Type
|
||||
hi def link aslObjects Identifier
|
||||
hi def link aslPreProc PreProc
|
||||
hi def link aslPreProcMatch PreProc
|
||||
hi def link aslZeroOne Number
|
||||
hi def link aslNumber Number
|
||||
|
||||
let b:current_syntax = "asl"
|
||||
syn sync minlines=200
|
||||
|
||||
@@ -36,6 +36,7 @@ syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" c
|
||||
syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @cannot @elsecan @elsecannot @include
|
||||
\ @includeIf @each @inject @extends @section @stack @push @unless @yield @parent @hasSection @break @continue
|
||||
\ @unset @lang @choice @component @slot @prepend @json @isset @auth @guest @switch @case @includeFirst @empty
|
||||
\ @includeWhen
|
||||
\ nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt
|
||||
|
||||
syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @endforelse @endwhile @endcan
|
||||
|
||||
@@ -309,7 +309,7 @@ if !exists('g:crystal_no_comment_fold')
|
||||
endif
|
||||
|
||||
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
|
||||
|
||||
173
syntax/csv.vim
Normal file
173
syntax/csv.vim
Normal file
@@ -0,0 +1,173 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'csv') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" A simple syntax highlighting, simply alternate colors between two
|
||||
" adjacent columns
|
||||
" Init {{{2
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
scriptencoding utf8
|
||||
if version < 600
|
||||
syn clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Helper functions "{{{2
|
||||
fu! <sid>Warning(msg) "{{{3
|
||||
" Don't redraw, so we are not overwriting messages from the ftplugin
|
||||
" script
|
||||
echohl WarningMsg
|
||||
echomsg "CSV Syntax:" . a:msg
|
||||
echohl Normal
|
||||
endfu
|
||||
|
||||
fu! <sid>Esc(val, char) "{{{3
|
||||
if empty(a:val)
|
||||
return a:val
|
||||
endif
|
||||
return '\V'.escape(a:val, '\\'.a:char).'\m'
|
||||
endfu
|
||||
|
||||
fu! <sid>CheckSaneSearchPattern() "{{{3
|
||||
let s:del_def = ','
|
||||
let s:col_def = '\%([^' . s:del_def . ']*' . s:del_def . '\|$\)'
|
||||
let s:col_def_end = '\%([^' . s:del_def . ']*' . s:del_def . '\)'
|
||||
|
||||
" First:
|
||||
" Check for filetype plugin. This syntax script relies on the filetype
|
||||
" plugin, else, it won't work properly.
|
||||
redir => s:a |sil filetype | redir end
|
||||
let s:a=split(s:a, "\n")[0]
|
||||
if match(s:a, '\cplugin:off') > 0
|
||||
call <sid>Warning("No filetype support, only simple highlighting using"
|
||||
\ . s:del_def . " as delimiter! See :h csv-installation")
|
||||
endif
|
||||
|
||||
" Check Comment setting
|
||||
if !exists("g:csv_comment")
|
||||
let b:csv_cmt = split(&cms, '%s')
|
||||
elseif match(g:csv_comment, '%s') >= 0
|
||||
let b:csv_cmt = split(g:csv_comment, '%s')
|
||||
else
|
||||
let b:csv_cmt = [g:csv_comment]
|
||||
endif
|
||||
|
||||
|
||||
" Second: Check for sane defaults for the column pattern
|
||||
" Not necessary to check for fixed width columns
|
||||
if exists("b:csv_fixed_width_cols")
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
" Try a simple highlighting, if the defaults from the ftplugin
|
||||
" don't exist
|
||||
let s:col = get(b:, 'col', s:col_def)
|
||||
let s:col_end = get(b:, 'col_end', s:col_def_end)
|
||||
let s:del = get(b:, 'delimiter', s:del_def)
|
||||
let s:cmts = b:csv_cmt[0]
|
||||
let s:cmte = len(b:csv_cmt) == 2 ? b:csv_cmt[1] : ''
|
||||
" Make the file start at the first actual CSV record (issue #71)
|
||||
if !exists("b:csv_headerline")
|
||||
let cmts = <sid>Esc(s:cmts, '')
|
||||
let pattern = '\%^\(\%('.cmts.'.*\n\)\|\%(\s*\n\)\)\+'
|
||||
let start = search(pattern, 'nWe', 10)
|
||||
" don't do it, on an empty file
|
||||
if start > 0 && !empty(getline(start))
|
||||
let b:csv_headerline = start+1
|
||||
endif
|
||||
endif
|
||||
" escape '/' for syn match command
|
||||
let s:cmts=<sid>Esc(s:cmts, '/')
|
||||
let s:cmte=<sid>Esc(s:cmte, '/')
|
||||
|
||||
if line('$') > 1 && (!exists("b:col") || empty(b:col))
|
||||
" check for invalid pattern, ftplugin hasn't been loaded yet
|
||||
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
|
||||
endif
|
||||
endfu
|
||||
|
||||
" Syntax rules {{{2
|
||||
fu! <sid>DoHighlight() "{{{3
|
||||
if has("conceal") && !exists("g:csv_no_conceal") &&
|
||||
\ !exists("b:csv_fixed_width_cols")
|
||||
exe "syn match CSVDelimiter /" . s:col_end .
|
||||
\ '/ms=e,me=e contained conceal cchar=' .
|
||||
\ (&enc == "utf-8" ? "│" : '|')
|
||||
hi def link CSVDelimiter Conceal
|
||||
elseif !exists("b:csv_fixed_width_cols")
|
||||
" The \%(.\)\@<= makes sure, the last char won't be concealed,
|
||||
" if it isn't a delimiter
|
||||
exe "syn match CSVDelimiter /" . s:col_end . '/ms=e,me=e contained'
|
||||
if has("conceal")
|
||||
hi def link CSVDelimiter Conceal
|
||||
else
|
||||
hi def link CSVDelimiter Ignore
|
||||
endif
|
||||
endif " There is no delimiter for csv fixed width columns
|
||||
|
||||
if !exists("b:csv_fixed_width_cols")
|
||||
exe 'syn match CSVColumnEven nextgroup=CSVColumnOdd /'
|
||||
\ . s:col . '/ contains=CSVDelimiter'
|
||||
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
|
||||
\ . s:col . '/ contains=CSVDelimiter'
|
||||
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
|
||||
\. s:col . '/ contains=CSVDelimiter'
|
||||
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
|
||||
\. s:col . '/ contains=CSVDelimiter'
|
||||
else
|
||||
for i in range(len(b:csv_fixed_width_cols))
|
||||
let pat = '/\%' . b:csv_fixed_width_cols[i] . 'v.*' .
|
||||
\ ((i == len(b:csv_fixed_width_cols)-1) ? '/' :
|
||||
\ '\%' . b:csv_fixed_width_cols[i+1] . 'v/')
|
||||
|
||||
let group = "CSVColumn" . (i%2 ? "Odd" : "Even" )
|
||||
let ngroup = "CSVColumn" . (i%2 ? "Even" : "Odd" )
|
||||
exe "syn match " group pat " nextgroup=" . ngroup
|
||||
endfor
|
||||
endif
|
||||
" Comment regions
|
||||
exe 'syn match CSVComment /'. s:cmts. '.*'.
|
||||
\ (!empty(s:cmte) ? '\%('. s:cmte. '\)\?'
|
||||
\: ''). '/'
|
||||
hi def link CSVComment Comment
|
||||
endfun
|
||||
|
||||
fu! <sid>HiLink(name, target) "{{{3
|
||||
if !hlexists(a:name)
|
||||
exe "hi def link" a:name a:target
|
||||
endif
|
||||
endfu
|
||||
|
||||
fu! <sid>DoSyntaxDefinitions() "{{{3
|
||||
syn spell toplevel
|
||||
" Not really needed
|
||||
syn case ignore
|
||||
call <sid>HiLink("CSVColumnHeaderOdd", "WarningMsg")
|
||||
call <sid>HiLink("CSVColumnHeaderEven", "WarningMsg")
|
||||
if get(g:, 'csv_no_column_highlight', 0)
|
||||
call <sid>HiLink("CSVColumnOdd", "Normal")
|
||||
call <sid>HiLink("CSVColumnEven", "Normal")
|
||||
else
|
||||
call <sid>HiLink("CSVColumnOdd", "String")
|
||||
call <sid>HiLink("CSVColumnEven","Statement")
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Main: {{{2
|
||||
" Make sure, we are using a sane, valid pattern for syntax
|
||||
" highlighting
|
||||
call <sid>CheckSaneSearchPattern()
|
||||
" Define all necessary syntax groups
|
||||
call <sid>DoSyntaxDefinitions()
|
||||
" Highlight the file
|
||||
call <sid>DoHighlight()
|
||||
" Set the syntax variable {{{2
|
||||
let b:current_syntax="csv"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: set foldmethod=marker et sw=0 sts=-1 ts=4:
|
||||
@@ -31,10 +31,10 @@ syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
|
||||
syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
|
||||
syn keyword lispFunc write-file system bash
|
||||
|
||||
syn cluster lispBaseListCluster add=jbuildVar
|
||||
syn match jbuildVar '\${[@<^]}' containedin=lispSymbol
|
||||
syn match jbuildVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
|
||||
syn cluster lispBaseListCluster add=duneVar
|
||||
syn match duneVar '\${[@<^]}' containedin=lispSymbol
|
||||
syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
|
||||
|
||||
hi def link jbuildVar Identifier
|
||||
hi def link duneVar Identifier
|
||||
|
||||
let b:current_syntax = "jbuild"
|
||||
let b:current_syntax = "dune"
|
||||
@@ -42,25 +42,48 @@ highlight default link gomodReplaceOperator Operator
|
||||
|
||||
|
||||
" highlight versions:
|
||||
" * vX.Y.Z-pre
|
||||
" * vX.Y.Z
|
||||
" * vX.0.0-yyyyymmddhhmmss-abcdefabcdef
|
||||
" * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef
|
||||
" * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef
|
||||
" * +incompatible suffix when X > 1
|
||||
" see https://godoc.org/golang.org/x/tools/internal/semver for more
|
||||
" information about how semantic versions are parsed and
|
||||
" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible
|
||||
" are applied.
|
||||
|
||||
|
||||
" match vX.Y.Z and their prereleases
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14}-\x\+\)\?"
|
||||
" match target when most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14}-\x\+\)\)\?"
|
||||
" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+"
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?"
|
||||
" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^
|
||||
" ^--------------------------------------- semantic version -------------------------------------------------------^
|
||||
|
||||
" match vX.Y.Z and their prereleases for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14\}-\x\+\)\?\%(+incompatible\>\)\?"
|
||||
" match target when most recent version before the target is X.Y.Z for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14\}-\x\+\)\)\?\%(+incompatible\>\)\?"
|
||||
" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) for X>1
|
||||
syntax match gomodVersion "v[2-9]\{1}\d\?\.0\.0-\d\{14\}-\x\+\%(+incompatible\>\)\?"
|
||||
" match pseudo versions
|
||||
" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+"
|
||||
" when most recent version before target is a pre-release
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+"
|
||||
" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^
|
||||
" ^------------------------------------- semantic version --------------------------------------------------^
|
||||
" most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+"
|
||||
" ^--- version ---^^--------------- metadata ---------------------^
|
||||
|
||||
" match incompatible vX.Y.Z and their prereleases
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible"
|
||||
" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^
|
||||
" ^------------------------------------------- semantic version -----------------------------------------------------------^
|
||||
|
||||
" match incompatible pseudo versions
|
||||
" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible"
|
||||
" when most recent version before target is a pre-release
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible"
|
||||
" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^
|
||||
" ^---------------------------------------- semantic version ------------------------------------------------------^
|
||||
" most recent version before the target is X.Y.Z
|
||||
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible"
|
||||
" ^------- version -------^^---------------- metadata ---------------------^
|
||||
highlight default link gomodVersion Identifier
|
||||
|
||||
let b:current_syntax = "gomod"
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: GraphQL
|
||||
" Maintainer: Jon Parise <jon@indelible.org>
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match graphqlComment "#.*$" contains=@Spell
|
||||
|
||||
syn match graphqlOperator "=" display
|
||||
syn match graphqlOperator "!" display
|
||||
syn match graphqlOperator "|" display
|
||||
syn match graphqlOperator "\M..." display
|
||||
|
||||
syn keyword graphqlBoolean true false
|
||||
syn keyword graphqlNull null
|
||||
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display
|
||||
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
|
||||
syn region graphqlString start=+"""+ end=+"""+
|
||||
|
||||
syn keyword graphqlKeyword on nextgroup=graphqlType skipwhite
|
||||
|
||||
syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure implements nextgroup=graphqlType skipwhite
|
||||
syn keyword graphqlStructure query mutation fragment nextgroup=graphqlName skipwhite
|
||||
syn keyword graphqlStructure directive nextgroup=graphqlDirective skipwhite
|
||||
syn keyword graphqlStructure extend nextgroup=graphqlStructure skipwhite
|
||||
syn keyword graphqlStructure schema nextgroup=graphqlFold skipwhite
|
||||
|
||||
syn match graphqlDirective "\<@\h\w*\>" display
|
||||
syn match graphqlVariable "\<\$\h\w*\>" display
|
||||
syn match graphqlName "\<\h\w*\>" display
|
||||
syn match graphqlType "\<_*\u\w*\>" display
|
||||
syn match graphqlConstant "\<[A-Z_]\+\>" display
|
||||
|
||||
syn keyword graphqlMetaFields __schema __type __typename
|
||||
|
||||
syn region graphqlFold matchgroup=graphqlBraces start="{" end="}" transparent fold contains=ALLBUT,graphqlStructure
|
||||
syn region graphqlList matchgroup=graphqlBraces start="\[" end="]" transparent contains=ALLBUT,graphqlDirective,graphqlStructure
|
||||
|
||||
hi def link graphqlComment Comment
|
||||
hi def link graphqlOperator Operator
|
||||
|
||||
hi def link graphqlBraces Delimiter
|
||||
|
||||
hi def link graphqlBoolean Boolean
|
||||
hi def link graphqlNull Keyword
|
||||
hi def link graphqlNumber Number
|
||||
hi def link graphqlString String
|
||||
|
||||
hi def link graphqlConstant Constant
|
||||
hi def link graphqlDirective PreProc
|
||||
hi def link graphqlName Identifier
|
||||
hi def link graphqlMetaFields Special
|
||||
hi def link graphqlKeyword Keyword
|
||||
hi def link graphqlStructure Structure
|
||||
hi def link graphqlType Type
|
||||
hi def link graphqlVariable Identifier
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = 'graphql'
|
||||
@@ -5,8 +5,8 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: i3 config file
|
||||
" Maintainer: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
||||
" Version: 0.3
|
||||
" Last Change: 2017-10-27 23:59
|
||||
" Version: 0.4
|
||||
" Last Change: 2019-03-23 21:54
|
||||
|
||||
" References:
|
||||
" http://i3wm.org/docs/userguide.html#configuring
|
||||
@@ -24,231 +24,231 @@ en
|
||||
scriptencoding utf-8
|
||||
|
||||
" Error
|
||||
syn match Error /.*/
|
||||
syn match i3ConfigError /.*/
|
||||
|
||||
" Todo
|
||||
syn keyword Todo TODO FIXME XXX contained
|
||||
syn keyword i3ConfigTodo TODO FIXME XXX contained
|
||||
|
||||
" Comment
|
||||
" Comments are started with a # and can only be used at the beginning of a line
|
||||
syn match Comment /^\s*#.*$/ contains=Todo
|
||||
syn match i3ConfigComment /^\s*#.*$/ contains=i3ConfigTodo
|
||||
|
||||
" Font
|
||||
" A FreeType font description is composed by:
|
||||
" a font family, a style, a weight, a variant, a stretch and a size.
|
||||
syn match FontSeparator /,/ contained
|
||||
syn match FontSeparator /:/ contained
|
||||
syn keyword FontKeyword font contained
|
||||
syn match FontNamespace /\w\+:/ contained contains=FontSeparator
|
||||
syn match FontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=FontNamespace,FontSeparator,FontKeyword
|
||||
syn match FontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match Font /^\s*font\s\+.*$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
"syn match Font /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=FontContent,FontSeparator,FontSize,FontNamespace
|
||||
syn match i3ConfigFontSeparator /,/ contained
|
||||
syn match i3ConfigFontSeparator /:/ contained
|
||||
syn keyword i3ConfigFontKeyword font contained
|
||||
syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator
|
||||
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
|
||||
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
"syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||
|
||||
" variables
|
||||
syn match String /\(['"]\)\(.\{-}\)\1/ contained
|
||||
syn match Color /#\w\{6}/ contained
|
||||
syn match VariableModifier /+/ contained
|
||||
syn match VariableAndModifier /+\w\+/ contained contains=VariableModifier
|
||||
syn match Variable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=VariableModifier,VariableAndModifier
|
||||
syn keyword InitializeKeyword set contained
|
||||
syn match Initialize /^\s*set\s\+.*$/ contains=Variable,InitializeKeyword,Color,String
|
||||
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
||||
syn match i3ConfigColor /#\w\{6}/ contained
|
||||
syn match i3ConfigVariableModifier /+/ contained
|
||||
syn match i3ConfigVariableAndModifier /+\w\+/ contained contains=i3ConfigVariableModifier
|
||||
syn match i3ConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=i3ConfigVariableModifier,i3ConfigVariableAndModifier
|
||||
syn keyword i3ConfigInitializeKeyword set contained
|
||||
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
|
||||
|
||||
" Gaps
|
||||
syn keyword GapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
||||
syn match GapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(\d\+\|\$.*\)\)$/ contains=GapStyleKeyword,number,Variable
|
||||
syn keyword SmartGapKeyword on inverse_outer contained
|
||||
syn match SmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=SmartGapKeyword
|
||||
syn keyword SmartBorderKeyword on no_gaps contained
|
||||
syn match SmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=SmartBorderKeyword
|
||||
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,number,i3ConfigVariable
|
||||
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
|
||||
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
|
||||
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
|
||||
syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword
|
||||
|
||||
" Keyboard bindings
|
||||
syn keyword Action toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword Action focus move split layout resize restore reload mute unmute exit contained
|
||||
syn match Modifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=VariableModifier
|
||||
syn match Number /\s\d\+/ contained
|
||||
syn keyword BindKeyword bindsym bindcode exec gaps contained
|
||||
syn match BindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match Bind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=Variable,BindKeyword,VariableAndModifier,BindArgument,Number,Modifier,Action,String,GapStyleKeyword
|
||||
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword i3ConfigAction focus move split layout resize restore reload mute unmute exit contained
|
||||
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
|
||||
syn match i3ConfigNumber /\s\d\+/ contained
|
||||
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained
|
||||
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigBindArgument,i3ConfigNumber,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
||||
|
||||
" Floating
|
||||
syn keyword SizeSpecial x contained
|
||||
syn match NegativeSize /-/ contained
|
||||
syn match Size /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=SizeSpecial,Number,NegativeSize
|
||||
syn match Floating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=Variable
|
||||
syn match Floating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
||||
syn keyword i3ConfigSizeSpecial x contained
|
||||
syn match i3ConfigNegativeSize /-/ contained
|
||||
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
|
||||
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
|
||||
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
||||
|
||||
" Orientation
|
||||
syn keyword OrientationKeyword vertical horizontal auto contained
|
||||
syn match Orientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=OrientationKeyword
|
||||
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
|
||||
syn match i3ConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=i3ConfigOrientationKeyword
|
||||
|
||||
" Layout
|
||||
syn keyword LayoutKeyword default stacking tabbed contained
|
||||
syn match Layout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=LayoutKeyword
|
||||
syn keyword i3ConfigLayoutKeyword default stacking tabbed contained
|
||||
syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=i3ConfigLayoutKeyword
|
||||
|
||||
" Border style
|
||||
syn keyword BorderStyleKeyword none normal pixel contained
|
||||
syn match BorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=BorderStyleKeyword,number
|
||||
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
|
||||
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,number
|
||||
|
||||
" Hide borders and edges
|
||||
syn keyword EdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
syn match Edge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=EdgeKeyword
|
||||
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=i3ConfigEdgeKeyword
|
||||
|
||||
" Arbitrary commands for specific windows (for_window)
|
||||
syn keyword CommandKeyword for_window contained
|
||||
syn region WindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=String
|
||||
syn region WindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,String
|
||||
syn match ArbitraryCommand /^\s*for_window\s\+.*$/ contains=WindowCommandSpecial,CommandKeyword,BorderStyleKeyword,LayoutKeyword,OrientationKeyword,Size,Number
|
||||
syn keyword i3ConfigCommandKeyword for_window contained
|
||||
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
|
||||
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,i3ConfigString
|
||||
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
|
||||
|
||||
" Disable focus open opening
|
||||
syn keyword NoFocusKeyword no_focus contained
|
||||
syn match DisableFocus /^\s*no_focus\s\+.*$/ contains=WindowCommandSpecial,NoFocusKeyword
|
||||
syn keyword i3ConfigNoFocusKeyword no_focus contained
|
||||
syn match i3ConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigNoFocusKeyword
|
||||
|
||||
" Move client to specific workspace automatically
|
||||
syn keyword AssignKeyword assign contained
|
||||
syn match AssignSpecial /→/ contained
|
||||
syn match Assign /^\s*assign\s\+.*$/ contains=AssignKeyword,WindowCommandSpecial,AssignSpecial
|
||||
syn keyword i3ConfigAssignKeyword assign contained
|
||||
syn match i3ConfigAssignSpecial /→/ contained
|
||||
syn match i3ConfigAssign /^\s*assign\s\+.*$/ contains=i3ConfigAssignKeyword,i3ConfigWindowCommandSpecial,i3ConfigAssignSpecial
|
||||
|
||||
" X resources
|
||||
syn keyword ResourceKeyword set_from_resource contained
|
||||
syn match Resource /^\s*set_from_resource\s\+.*$/ contains=ResourceKeyword,WindowCommandSpecial,Color,Variable
|
||||
syn keyword i3ConfigResourceKeyword set_from_resource contained
|
||||
syn match i3ConfigResource /^\s*set_from_resource\s\+.*$/ contains=i3ConfigResourceKeyword,i3ConfigWindowCommandSpecial,i3ConfigColor,i3ConfigVariable
|
||||
|
||||
" Auto start applications
|
||||
syn keyword ExecKeyword exec exec_always contained
|
||||
syn match NoStartupId /--no-startup-id/ contained " We are not using BindArgument as only no-startup-id is supported here
|
||||
syn match Exec /^\s*exec\(_always\)\?\s\+.*$/ contains=ExecKeyword,NoStartupId,String
|
||||
syn keyword i3ConfigExecKeyword exec exec_always contained
|
||||
syn match i3ConfigNoStartupId /--no-startup-id/ contained " We are not using i3ConfigBindArgument as only no-startup-id is supported here
|
||||
syn match i3ConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=i3ConfigExecKeyword,i3ConfigNoStartupId,i3ConfigString
|
||||
|
||||
" Automatically putting workspaces on specific screens
|
||||
syn keyword WorkspaceKeyword workspace contained
|
||||
syn keyword Output output contained
|
||||
syn match Workspace /^\s*workspace\s\+.*$/ contains=WorkspaceKeyword,Number,String,Output
|
||||
syn keyword i3ConfigWorkspaceKeyword workspace contained
|
||||
syn keyword i3ConfigOutput output contained
|
||||
syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigOutput
|
||||
|
||||
" Changing colors
|
||||
syn keyword ClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match ClientColor /^\s*client.\w\+\s\+.*$/ contains=ClientColorKeyword,Color,Variable
|
||||
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
|
||||
|
||||
" Interprocess communication
|
||||
syn match InterprocessKeyword /ipc-socket/ contained
|
||||
syn match Interprocess /^\s*ipc-socket\s\+.*$/ contains=InterprocessKeyword
|
||||
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
|
||||
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
|
||||
|
||||
" Mouse warping
|
||||
syn keyword MouseWarpingKeyword mouse_warping contained
|
||||
syn keyword MouseWarpingType output none contained
|
||||
syn match MouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=MouseWarpingKeyword,MouseWarpingType
|
||||
syn keyword i3ConfigMouseWarpingKeyword mouse_warping contained
|
||||
syn keyword i3ConfigMouseWarpingType output none contained
|
||||
syn match i3ConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=i3ConfigMouseWarpingKeyword,i3ConfigMouseWarpingType
|
||||
|
||||
" Focus follows mouse
|
||||
syn keyword FocusFollowsMouseKeyword focus_follows_mouse contained
|
||||
syn keyword FocusFollowsMouseType yes no contained
|
||||
syn match FocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=FocusFollowsMouseKeyword,FocusFollowsMouseType
|
||||
syn keyword i3ConfigFocusFollowsMouseKeyword focus_follows_mouse contained
|
||||
syn keyword i3ConfigFocusFollowsMouseType yes no contained
|
||||
syn match i3ConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,i3ConfigFocusFollowsMouseType
|
||||
|
||||
" Popups during fullscreen mode
|
||||
syn keyword PopupOnFullscreenKeyword popup_during_fullscreen contained
|
||||
syn keyword PopuponFullscreenType smart ignore leave_fullscreen contained
|
||||
syn match PopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=PopupOnFullscreenKeyword,PopupOnFullscreenType
|
||||
syn keyword i3ConfigPopupOnFullscreenKeyword popup_during_fullscreen contained
|
||||
syn keyword i3ConfigPopuponFullscreenType smart ignore leave_fullscreen contained
|
||||
syn match i3ConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=i3ConfigPopupOnFullscreenKeyword,i3ConfigPopupOnFullscreenType
|
||||
|
||||
" Focus wrapping
|
||||
syn keyword FocusWrappingKeyword force_focus_wrapping focus_wrapping contained
|
||||
syn keyword FocusWrappingType yes no contained
|
||||
syn match FocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,FocusWrappingKeyword
|
||||
syn keyword i3ConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained
|
||||
syn keyword i3ConfigFocusWrappingType yes no contained
|
||||
syn match i3ConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigFocusWrappingKeyword
|
||||
|
||||
" Forcing Xinerama
|
||||
syn keyword ForceXineramaKeyword force_xinerama contained
|
||||
syn match ForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,ForceXineramaKeyword
|
||||
syn keyword i3ConfigForceXineramaKeyword force_xinerama contained
|
||||
syn match i3ConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigForceXineramaKeyword
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword AutomaticSwitchKeyword workspace_auto_back_and_forth contained
|
||||
syn match AutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,AutomaticSwitchKeyword
|
||||
syn keyword i3ConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained
|
||||
syn match i3ConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigAutomaticSwitchKeyword
|
||||
|
||||
" Delay urgency hint
|
||||
syn keyword TimeUnit ms contained
|
||||
syn keyword DelayUrgencyKeyword force_display_urgency_hint contained
|
||||
syn match DelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=FocusWrappingType,DelayUrgencyKeyword,Number,TimeUnit
|
||||
syn keyword i3ConfigTimeUnit ms contained
|
||||
syn keyword i3ConfigDelayUrgencyKeyword force_display_urgency_hint contained
|
||||
syn match i3ConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDelayUrgencyKeyword,i3ConfigNumber,i3ConfigTimeUnit
|
||||
|
||||
" Focus on window activation
|
||||
syn keyword FocusOnActivationKeyword focus_on_window_activation contained
|
||||
syn keyword FocusOnActivationType smart urgent focus none contained
|
||||
syn match FocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=FocusOnActivationKeyword,FocusOnActivationType
|
||||
syn keyword i3ConfigFocusOnActivationKeyword focus_on_window_activation contained
|
||||
syn keyword i3ConfigFocusOnActivationType smart urgent focus none contained
|
||||
syn match i3ConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=i3ConfigFocusOnActivationKeyword,i3ConfigFocusOnActivationType
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword DrawingMarksKeyword show_marks contained
|
||||
syn match DrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=FocusWrappingType,DrawingMarksKeyword
|
||||
syn keyword i3ConfigDrawingMarksKeyword show_marks contained
|
||||
syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword
|
||||
|
||||
" Group mode/bar
|
||||
syn keyword BlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region Block start=+.*s\?{$+ end=+^}$+ contains=BlockKeyword,String,Bind,Comment,Font,FocusWrappingType,Color,Variable transparent keepend extend
|
||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Line continuation
|
||||
syn region LineCont start=/^.*\\$/ end=/^.*$/ contains=BlockKeyword,String,Bind,Comment,Font,FocusWrappingType,Color,Variable transparent keepend extend
|
||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||
|
||||
" Define the highlighting.
|
||||
hi! def link Error Error
|
||||
hi! def link Todo Todo
|
||||
hi! def link Comment Comment
|
||||
hi! def link FontContent Type
|
||||
hi! def link FocusOnActivationType Type
|
||||
hi! def link PopupOnFullscreenType Type
|
||||
hi! def link OrientationKeyword Type
|
||||
hi! def link MouseWarpingType Type
|
||||
hi! def link FocusFollowsMouseType Type
|
||||
hi! def link GapStyleKeyword Type
|
||||
hi! def link SmartGapKeyword Type
|
||||
hi! def link SmartBorderKeyword Type
|
||||
hi! def link LayoutKeyword Type
|
||||
hi! def link BorderStyleKeyword Type
|
||||
hi! def link EdgeKeyword Type
|
||||
hi! def link Action Type
|
||||
hi! def link Command Type
|
||||
hi! def link Output Type
|
||||
hi! def link WindowCommandSpecial Type
|
||||
hi! def link FocusWrappingType Type
|
||||
hi! def link FontSize Constant
|
||||
hi! def link Color Constant
|
||||
hi! def link Number Constant
|
||||
hi! def link VariableAndModifier Constant
|
||||
hi! def link TimeUnit Constant
|
||||
hi! def link Modifier Constant
|
||||
hi! def link String Constant
|
||||
hi! def link NegativeSize Constant
|
||||
hi! def link FontSeparator Special
|
||||
hi! def link VariableModifier Special
|
||||
hi! def link SizeSpecial Special
|
||||
hi! def link WindowSpecial Special
|
||||
hi! def link AssignSpecial Special
|
||||
hi! def link FontNamespace PreProc
|
||||
hi! def link BindArgument PreProc
|
||||
hi! def link NoStartupId PreProc
|
||||
hi! def link FontKeyword Identifier
|
||||
hi! def link BindKeyword Identifier
|
||||
hi! def link Orientation Identifier
|
||||
hi! def link GapStyle Identifier
|
||||
hi! def link SmartGap Identifier
|
||||
hi! def link SmartBorder Identifier
|
||||
hi! def link Layout Identifier
|
||||
hi! def link BorderStyle Identifier
|
||||
hi! def link Edge Identifier
|
||||
hi! def link Floating Identifier
|
||||
hi! def link CommandKeyword Identifier
|
||||
hi! def link NoFocusKeyword Identifier
|
||||
hi! def link InitializeKeyword Identifier
|
||||
hi! def link AssignKeyword Identifier
|
||||
hi! def link ResourceKeyword Identifier
|
||||
hi! def link ExecKeyword Identifier
|
||||
hi! def link WorkspaceKeyword Identifier
|
||||
hi! def link ClientColorKeyword Identifier
|
||||
hi! def link InterprocessKeyword Identifier
|
||||
hi! def link MouseWarpingKeyword Identifier
|
||||
hi! def link FocusFollowsMouseKeyword Identifier
|
||||
hi! def link PopupOnFullscreenKeyword Identifier
|
||||
hi! def link FocusWrappingKeyword Identifier
|
||||
hi! def link ForceXineramaKeyword Identifier
|
||||
hi! def link AutomaticSwitchKeyword Identifier
|
||||
hi! def link DelayUrgencyKeyword Identifier
|
||||
hi! def link FocusOnActivationKeyword Identifier
|
||||
hi! def link DrawingMarksKeyword Identifier
|
||||
hi! def link BlockKeyword Identifier
|
||||
hi! def link Variable Statement
|
||||
hi! def link ArbitraryCommand Type
|
||||
hi! def link i3ConfigError Error
|
||||
hi! def link i3ConfigTodo Todo
|
||||
hi! def link i3ConfigComment Comment
|
||||
hi! def link i3ConfigFontContent Type
|
||||
hi! def link i3ConfigFocusOnActivationType Type
|
||||
hi! def link i3ConfigPopupOnFullscreenType Type
|
||||
hi! def link i3ConfigOrientationKeyword Type
|
||||
hi! def link i3ConfigMouseWarpingType Type
|
||||
hi! def link i3ConfigFocusFollowsMouseType Type
|
||||
hi! def link i3ConfigGapStyleKeyword Type
|
||||
hi! def link i3ConfigSmartGapKeyword Type
|
||||
hi! def link i3ConfigSmartBorderKeyword Type
|
||||
hi! def link i3ConfigLayoutKeyword Type
|
||||
hi! def link i3ConfigBorderStyleKeyword Type
|
||||
hi! def link i3ConfigEdgeKeyword Type
|
||||
hi! def link i3ConfigAction Type
|
||||
hi! def link i3ConfigCommand Type
|
||||
hi! def link i3ConfigOutput Type
|
||||
hi! def link i3ConfigWindowCommandSpecial Type
|
||||
hi! def link i3ConfigFocusWrappingType Type
|
||||
hi! def link i3ConfigFontSize Constant
|
||||
hi! def link i3ConfigColor Constant
|
||||
hi! def link i3ConfigNumber Constant
|
||||
hi! def link i3ConfigVariableAndModifier Constant
|
||||
hi! def link i3ConfigTimeUnit Constant
|
||||
hi! def link i3ConfigModifier Constant
|
||||
hi! def link i3ConfigString Constant
|
||||
hi! def link i3ConfigNegativeSize Constant
|
||||
hi! def link i3ConfigFontSeparator Special
|
||||
hi! def link i3ConfigVariableModifier Special
|
||||
hi! def link i3ConfigSizeSpecial Special
|
||||
hi! def link i3ConfigWindowSpecial Special
|
||||
hi! def link i3ConfigAssignSpecial Special
|
||||
hi! def link i3ConfigFontNamespace PreProc
|
||||
hi! def link i3ConfigBindArgument PreProc
|
||||
hi! def link i3ConfigNoStartupId PreProc
|
||||
hi! def link i3ConfigFontKeyword Identifier
|
||||
hi! def link i3ConfigBindKeyword Identifier
|
||||
hi! def link i3ConfigOrientation Identifier
|
||||
hi! def link i3ConfigGapStyle Identifier
|
||||
hi! def link i3ConfigSmartGap Identifier
|
||||
hi! def link i3ConfigSmartBorder Identifier
|
||||
hi! def link i3ConfigLayout Identifier
|
||||
hi! def link i3ConfigBorderStyle Identifier
|
||||
hi! def link i3ConfigEdge Identifier
|
||||
hi! def link i3ConfigFloating Identifier
|
||||
hi! def link i3ConfigCommandKeyword Identifier
|
||||
hi! def link i3ConfigNoFocusKeyword Identifier
|
||||
hi! def link i3ConfigInitializeKeyword Identifier
|
||||
hi! def link i3ConfigAssignKeyword Identifier
|
||||
hi! def link i3ConfigResourceKeyword Identifier
|
||||
hi! def link i3ConfigExecKeyword Identifier
|
||||
hi! def link i3ConfigWorkspaceKeyword Identifier
|
||||
hi! def link i3ConfigClientColorKeyword Identifier
|
||||
hi! def link i3ConfigInterprocessKeyword Identifier
|
||||
hi! def link i3ConfigMouseWarpingKeyword Identifier
|
||||
hi! def link i3ConfigFocusFollowsMouseKeyword Identifier
|
||||
hi! def link i3ConfigPopupOnFullscreenKeyword Identifier
|
||||
hi! def link i3ConfigFocusWrappingKeyword Identifier
|
||||
hi! def link i3ConfigForceXineramaKeyword Identifier
|
||||
hi! def link i3ConfigAutomaticSwitchKeyword Identifier
|
||||
hi! def link i3ConfigDelayUrgencyKeyword Identifier
|
||||
hi! def link i3ConfigFocusOnActivationKeyword Identifier
|
||||
hi! def link i3ConfigDrawingMarksKeyword Identifier
|
||||
hi! def link i3ConfigBlockKeyword Identifier
|
||||
hi! def link i3ConfigVariable Statement
|
||||
hi! def link i3ConfigArbitraryCommand Type
|
||||
|
||||
let b:current_syntax = "i3config"
|
||||
|
||||
7
syntax/lilypond-words.vim
Normal file
7
syntax/lilypond-words.vim
Normal file
File diff suppressed because one or more lines are too long
91
syntax/lilypond.vim
Normal file
91
syntax/lilypond.vim
Normal file
@@ -0,0 +1,91 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond syntax file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/syntax/lilypond.vim
|
||||
" Uses Generated File: vim/syntax/lilypond-words.vim
|
||||
"
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read the LilyPond syntax match groups:
|
||||
" lilyKeyword, lilyReservedWord, lilyNote
|
||||
if version < 600
|
||||
so <sfile>:p:h/lilypond-words.vim
|
||||
else
|
||||
runtime! syntax/lilypond-words.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
endif
|
||||
|
||||
" Match also parethesis of angle type
|
||||
setlocal mps+=<:>
|
||||
|
||||
" Case matters
|
||||
syn case match
|
||||
|
||||
syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme
|
||||
|
||||
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold
|
||||
|
||||
syn region lilyString start=/"/ end=/"/ skip=/\\"/
|
||||
syn region lilyComment start="%{" skip="%$" end="%}"
|
||||
syn region lilyComment start="%\([^{]\|$\)" end="$"
|
||||
|
||||
syn match lilyNumber "[-_^.]\?\d\+[.]\?"
|
||||
syn match lilySlur "[(~)]"
|
||||
syn match lilySlur "\\[()]"
|
||||
syn match lilySpecial "\\[<!>\\]"
|
||||
" avoid highlighting the extra character in situations like
|
||||
" c--\mf c^^\mf c__\mf
|
||||
syn match lilyArticulation "[-_^][-_^+|>.]"
|
||||
|
||||
" Include Scheme syntax highlighting, where appropriate
|
||||
syn include @embeddedScheme syntax/scheme.vim
|
||||
unlet b:current_syntax
|
||||
syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme
|
||||
|
||||
" Rest of syntax highlighting rules start here
|
||||
"
|
||||
" " Define the default highlighting.
|
||||
" " For version 5.7 and earlier: only when not done already
|
||||
" " For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_lily_syn_inits")
|
||||
if version < 508
|
||||
let did_lily_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink Delimiter Identifier
|
||||
|
||||
HiLink lilyString String
|
||||
HiLink lilyComment Comment
|
||||
|
||||
HiLink lilyNote Identifier
|
||||
HiLink lilyArticulation PreProc
|
||||
HiLink lilyKeyword Keyword
|
||||
HiLink lilyReservedWord Type
|
||||
|
||||
HiLink lilyNumber Constant
|
||||
HiLink lilySpecial Special
|
||||
HiLink lilySlur ModeMsg
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "lilypond"
|
||||
237
syntax/llvm.vim
Normal file
237
syntax/llvm.vim
Normal file
@@ -0,0 +1,237 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: llvm
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
" Version: $Revision$
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
" Types.
|
||||
" Types also include struct, array, vector, etc. but these don't
|
||||
" benefit as much from having dedicated highlighting rules.
|
||||
syn keyword llvmType void half float double x86_fp80 fp128 ppc_fp128
|
||||
syn keyword llvmType label metadata x86_mmx
|
||||
syn keyword llvmType type label opaque token
|
||||
syn match llvmType /\<i\d\+\>/
|
||||
|
||||
" Instructions.
|
||||
" The true and false tokens can be used for comparison opcodes, but it's
|
||||
" much more common for these tokens to be used for boolean constants.
|
||||
syn keyword llvmStatement add addrspacecast alloca and arcp ashr atomicrmw
|
||||
syn keyword llvmStatement bitcast br catchpad catchswitch catchret call
|
||||
syn keyword llvmStatement cleanuppad cleanupret cmpxchg eq exact extractelement
|
||||
syn keyword llvmStatement extractvalue fadd fast fcmp fdiv fence fmul fpext
|
||||
syn keyword llvmStatement fptosi fptoui fptrunc free frem fsub getelementptr
|
||||
syn keyword llvmStatement icmp inbounds indirectbr insertelement insertvalue
|
||||
syn keyword llvmStatement inttoptr invoke landingpad load lshr malloc max min
|
||||
syn keyword llvmStatement mul nand ne ninf nnan nsw nsz nuw oeq oge ogt ole
|
||||
syn keyword llvmStatement olt one or ord phi ptrtoint resume ret sdiv select
|
||||
syn keyword llvmStatement sext sge sgt shl shufflevector sitofp sle slt srem
|
||||
syn keyword llvmStatement store sub switch trunc udiv ueq uge ugt uitofp ule ult
|
||||
syn keyword llvmStatement umax umin une uno unreachable unwind urem va_arg
|
||||
syn keyword llvmStatement xchg xor zext
|
||||
|
||||
" Keywords.
|
||||
syn keyword llvmKeyword
|
||||
\ acq_rel
|
||||
\ acquire
|
||||
\ addrspace
|
||||
\ alias
|
||||
\ align
|
||||
\ alignstack
|
||||
\ alwaysinline
|
||||
\ appending
|
||||
\ argmemonly
|
||||
\ arm_aapcscc
|
||||
\ arm_aapcs_vfpcc
|
||||
\ arm_apcscc
|
||||
\ asm
|
||||
\ atomic
|
||||
\ available_externally
|
||||
\ blockaddress
|
||||
\ builtin
|
||||
\ byval
|
||||
\ c
|
||||
\ catch
|
||||
\ caller
|
||||
\ cc
|
||||
\ ccc
|
||||
\ cleanup
|
||||
\ coldcc
|
||||
\ comdat
|
||||
\ common
|
||||
\ constant
|
||||
\ datalayout
|
||||
\ declare
|
||||
\ default
|
||||
\ define
|
||||
\ deplibs
|
||||
\ dereferenceable
|
||||
\ distinct
|
||||
\ dllexport
|
||||
\ dllimport
|
||||
\ dso_local
|
||||
\ dso_preemptable
|
||||
\ except
|
||||
\ external
|
||||
\ externally_initialized
|
||||
\ extern_weak
|
||||
\ fastcc
|
||||
\ filter
|
||||
\ from
|
||||
\ gc
|
||||
\ global
|
||||
\ hhvmcc
|
||||
\ hhvm_ccc
|
||||
\ hidden
|
||||
\ initialexec
|
||||
\ inlinehint
|
||||
\ inreg
|
||||
\ inteldialect
|
||||
\ intel_ocl_bicc
|
||||
\ internal
|
||||
\ linkonce
|
||||
\ linkonce_odr
|
||||
\ localdynamic
|
||||
\ localexec
|
||||
\ local_unnamed_addr
|
||||
\ minsize
|
||||
\ module
|
||||
\ monotonic
|
||||
\ msp430_intrcc
|
||||
\ musttail
|
||||
\ naked
|
||||
\ nest
|
||||
\ noalias
|
||||
\ nobuiltin
|
||||
\ nocapture
|
||||
\ noimplicitfloat
|
||||
\ noinline
|
||||
\ nonlazybind
|
||||
\ nonnull
|
||||
\ norecurse
|
||||
\ noredzone
|
||||
\ noreturn
|
||||
\ nounwind
|
||||
\ optnone
|
||||
\ optsize
|
||||
\ personality
|
||||
\ private
|
||||
\ protected
|
||||
\ ptx_device
|
||||
\ ptx_kernel
|
||||
\ readnone
|
||||
\ readonly
|
||||
\ release
|
||||
\ returned
|
||||
\ returns_twice
|
||||
\ sanitize_address
|
||||
\ sanitize_memory
|
||||
\ sanitize_thread
|
||||
\ section
|
||||
\ seq_cst
|
||||
\ sideeffect
|
||||
\ signext
|
||||
\ syncscope
|
||||
\ source_filename
|
||||
\ speculatable
|
||||
\ spir_func
|
||||
\ spir_kernel
|
||||
\ sret
|
||||
\ ssp
|
||||
\ sspreq
|
||||
\ sspstrong
|
||||
\ strictfp
|
||||
\ swiftcc
|
||||
\ tail
|
||||
\ target
|
||||
\ thread_local
|
||||
\ to
|
||||
\ triple
|
||||
\ unnamed_addr
|
||||
\ unordered
|
||||
\ uselistorder
|
||||
\ uselistorder_bb
|
||||
\ uwtable
|
||||
\ volatile
|
||||
\ weak
|
||||
\ weak_odr
|
||||
\ within
|
||||
\ writeonly
|
||||
\ x86_64_sysvcc
|
||||
\ win64cc
|
||||
\ x86_fastcallcc
|
||||
\ x86_stdcallcc
|
||||
\ x86_thiscallcc
|
||||
\ zeroext
|
||||
|
||||
" Obsolete keywords.
|
||||
syn keyword llvmError getresult begin end
|
||||
|
||||
" Misc syntax.
|
||||
syn match llvmNoName /[%@!]\d\+\>/
|
||||
syn match llvmNumber /-\?\<\d\+\>/
|
||||
syn match llvmFloat /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/
|
||||
syn match llvmFloat /\<0x\x\+\>/
|
||||
syn keyword llvmBoolean true false
|
||||
syn keyword llvmConstant zeroinitializer undef null none
|
||||
syn match llvmComment /;.*$/
|
||||
syn region llvmString start=/"/ skip=/\\"/ end=/"/
|
||||
syn match llvmLabel /[-a-zA-Z$._][-a-zA-Z$._0-9]*:/
|
||||
syn match llvmIdentifier /[%@][-a-zA-Z$._][-a-zA-Z$._0-9]*/
|
||||
|
||||
" Named metadata and specialized metadata keywords.
|
||||
syn match llvmIdentifier /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*$/
|
||||
syn match llvmIdentifier /![-a-zA-Z$._][-a-zA-Z$._0-9]*\ze\s*[=!]/
|
||||
syn match llvmType /!\zs\a\+\ze\s*(/
|
||||
syn match llvmConstant /\<DW_TAG_[a-z_]\+\>/
|
||||
syn match llvmConstant /\<DW_ATE_[a-zA-Z_]\+\>/
|
||||
syn match llvmConstant /\<DW_OP_[a-zA-Z0-9_]\+\>/
|
||||
syn match llvmConstant /\<DW_LANG_[a-zA-Z0-9_]\+\>/
|
||||
syn match llvmConstant /\<DW_VIRTUALITY_[a-z_]\+\>/
|
||||
syn match llvmConstant /\<DIFlag[A-Za-z]\+\>/
|
||||
|
||||
" Syntax-highlight lit test commands and bug numbers.
|
||||
syn match llvmSpecialComment /;\s*PR\d*\s*$/
|
||||
syn match llvmSpecialComment /;\s*REQUIRES:.*$/
|
||||
syn match llvmSpecialComment /;\s*RUN:.*$/
|
||||
syn match llvmSpecialComment /;\s*CHECK:.*$/
|
||||
syn match llvmSpecialComment "\v;\s*CHECK-(NEXT|NOT|DAG|SAME|LABEL):.*$"
|
||||
syn match llvmSpecialComment /;\s*XFAIL:.*$/
|
||||
|
||||
if version >= 508 || !exists("did_c_syn_inits")
|
||||
if version < 508
|
||||
let did_c_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink llvmType Type
|
||||
HiLink llvmStatement Statement
|
||||
HiLink llvmNumber Number
|
||||
HiLink llvmComment Comment
|
||||
HiLink llvmString String
|
||||
HiLink llvmLabel Label
|
||||
HiLink llvmKeyword Keyword
|
||||
HiLink llvmBoolean Boolean
|
||||
HiLink llvmFloat Float
|
||||
HiLink llvmNoName Identifier
|
||||
HiLink llvmConstant Constant
|
||||
HiLink llvmSpecialComment SpecialComment
|
||||
HiLink llvmError Error
|
||||
HiLink llvmIdentifier Identifier
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "llvm"
|
||||
File diff suppressed because one or more lines are too long
@@ -73,8 +73,8 @@ syn region pugPlainFilter matchgroup=pugFilter start="^\z(\s*\):\%(sass\|less\|
|
||||
|
||||
syn match pugScriptConditional "^\s*\<\%(if\|else\|else if\|elif\|unless\|while\|until\|case\|when\|default\)\>[?!]\@!"
|
||||
syn match pugScriptStatement "^\s*\<\%(each\|for\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!"
|
||||
syn region pugScriptLoopRegion start="^\s*\(for \)" end="$" contains=pugScriptLoopKeywords
|
||||
syn keyword pugScriptLoopKeywords for in
|
||||
syn region pugScriptLoopRegion start="^\s*\(for\|each\)" end="$" contains=pugScriptLoopKeywords
|
||||
syn keyword pugScriptLoopKeywords contained for each in
|
||||
|
||||
syn region pugJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,pugJavascriptTag,pugCoffeescriptFilter keepend
|
||||
syn region javascriptInterpolation start=/${/ end=/}/ contained
|
||||
|
||||
206
syntax/ruby.vim
206
syntax/ruby.vim
@@ -68,8 +68,7 @@ endfunction
|
||||
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" }}}
|
||||
|
||||
" Not-Top Cluster {{{1
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter
|
||||
|
||||
" Whitespace Errors {{{1
|
||||
@@ -84,17 +83,17 @@ endif
|
||||
|
||||
" Operators {{{1
|
||||
if exists("ruby_operators")
|
||||
syn match rubyDotOperator "\.\|&\." containedin=rubyKeywordAsMethod
|
||||
syn match rubyTernaryOperator "[[:alnum:]]\@1<!?\|:"
|
||||
syn match rubyDotOperator "\.\|&\."
|
||||
syn match rubyTernaryOperator "\%(\w\|[^\x00-\x7F]\)\@1<!?\|:"
|
||||
syn match rubyArithmeticOperator "\*\*\|[*/%+]\|->\@!"
|
||||
syn match rubyComparisonOperator "<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<<\@!\|>=\|[-=]\@1<!>"
|
||||
syn match rubyBitwiseOperator "[~^|]\|&\.\@!\|\%(class\s*\)\@<!<<\|>>"
|
||||
syn match rubyBooleanOperator "[[:alnum:]]\@1<!!\|&&\|||"
|
||||
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
|
||||
syn match rubyRangeOperator "\.\.\.\="
|
||||
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
|
||||
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
|
||||
syn match rubyScopeOperator "::"
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn cluster rubyOperator contains=ruby.*Operator
|
||||
endif
|
||||
@@ -105,26 +104,26 @@ syn match rubyInterpolation "#\$\%(-\w\|[!$&"'*+,./0:;<>?@\`~_]\|\w\+\)"
|
||||
syn match rubyInterpolation "#@@\=\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable
|
||||
syn match rubyInterpolationDelimiter "#\ze[$@]" display contained
|
||||
|
||||
syn match rubyStringEscape "\\\_." contained display
|
||||
syn match rubyStringEscape "\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match rubyStringEscape "\\u\%(\x\{4}\|{\x\{1,6}\%(\s\+\x\{1,6}\)*}\)" contained display
|
||||
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
syn match rubyStringEscape "\\\_." contained display
|
||||
syn match rubyStringEscape "\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match rubyStringEscape "\\u\%(\x\{4}\|{\x\{1,6}\%(\s\+\x\{1,6}\)*}\)" contained display
|
||||
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=.\)" contained display
|
||||
|
||||
syn match rubyBackslashEscape "\\\\" contained display
|
||||
syn match rubyQuoteEscape "\\'" contained display
|
||||
syn match rubySpaceEscape "\\ " contained display
|
||||
|
||||
syn match rubyParenthesesEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBracesEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketsEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketsEscape "\\[[\]]" contained display
|
||||
syn match rubyParenthesisEscape "\\[()]" contained display
|
||||
syn match rubyCurlyBraceEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketEscape "\\[[\]]" contained display
|
||||
|
||||
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
|
||||
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
|
||||
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
|
||||
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
|
||||
|
||||
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesesEscape,rubyCurlyBracesEscape,rubyAngleBracketsEscape,rubySquareBracketsEscape
|
||||
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape
|
||||
syn cluster rubyNestedBrackets contains=rubyNested.\+
|
||||
syn cluster rubyStringSpecial contains=rubyInterpolation,rubyStringEscape
|
||||
syn cluster rubyStringNotTop contains=@rubyStringSpecial,@rubyNestedBrackets,@rubySingleCharEscape
|
||||
@@ -153,20 +152,20 @@ syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display
|
||||
syn cluster rubyRegexpSpecial contains=@rubyStringSpecial,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment,rubyRegexpIntersection
|
||||
|
||||
" Numbers {{{1
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display
|
||||
syn match rubyInteger "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display
|
||||
syn match rubyFloat "\%(\%(\w\|[^\x00-\x7F]\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)i\=\>" display
|
||||
|
||||
" Identifiers {{{1
|
||||
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!]\=" contains=NONE display transparent
|
||||
syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
|
||||
|
||||
syn match rubyClassName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyModuleName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!"
|
||||
syn match rubyClassName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyModuleName "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" contained
|
||||
syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<[[:upper:]]\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!"
|
||||
syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
|
||||
syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
|
||||
syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)"
|
||||
@@ -195,7 +194,7 @@ syn match rubyPredefinedVariable "$_\>" display
|
||||
syn match rubyPredefinedVariable "$-[0FIWadilpvw]\>" display
|
||||
syn match rubyPredefinedVariable "$\%(stderr\|stdin\|stdout\)\>" display
|
||||
syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|FALSE\|NIL\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\)\>\%(\s*(\)\@!"
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
|
||||
|
||||
" Deprecated/removed in 1.9
|
||||
@@ -203,12 +202,14 @@ syn match rubyPredefinedVariable "$="
|
||||
syn match rubyPredefinedVariable "$-K\>" display
|
||||
syn match rubyPredefinedVariable "$\%(deferr\|defout\)\>" display
|
||||
syn match rubyPredefinedVariable "$KCODE\>" display
|
||||
" Deprecated/removed in 2.4
|
||||
syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(FALSE\|NIL\|TRUE\)\>\%(\s*(\)\@!"
|
||||
|
||||
syn cluster rubyGlobalVariable contains=rubyGlobalVariable,rubyPredefinedVariable,rubyGlobalVariableError
|
||||
|
||||
" Normal Regular Expressions {{{1
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/\%([ \t=]\|$\)\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '/' syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\s\+\)\@<=/\%(=\|\_s\)\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
|
||||
" Generalized Regular Expressions {{{1
|
||||
SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial nextgroup=@rubyModifier skipwhite
|
||||
@@ -219,8 +220,8 @@ SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%
|
||||
SynFold '%' syn region rubyRegexp matchgroup=rubyPercentRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial
|
||||
|
||||
" Characters {{{1
|
||||
syn match rubyCharacter "\%(\w\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
|
||||
syn match rubyCharacter "\%(\w\|[]})\"'/]\)\@1<!?\\u\%(\x\{4}\|{\x\{1,6}}\)"
|
||||
syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\[[:space:]]\|\\\=[^[:space:]]\)\)"
|
||||
syn match rubyCharacter "\%(\w\|[^\x00-\x7F]\|[]})\"'/]\)\@1<!?\\u\%(\x\{4}\|{\x\{1,6}}\)"
|
||||
|
||||
" Normal Strings {{{1
|
||||
let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : ''
|
||||
@@ -259,29 +260,29 @@ endfor
|
||||
unlet s:delimiter s:group s:names
|
||||
" }}}2
|
||||
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape
|
||||
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%w(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentSymbolDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=rubyBackslashEscape,rubySpaceEscape
|
||||
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBracesEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketsEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketsEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesesEscape,rubyNestedParentheses
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyBackslashEscape,rubySpaceEscape,rubyCurlyBraceEscape,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyBackslashEscape,rubySpaceEscape,rubyAngleBracketEscape,rubyNestedAngleBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyBackslashEscape,rubySpaceEscape,rubySquareBracketEscape,rubyNestedSquareBrackets
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyBackslashEscape,rubySpaceEscape,rubyParenthesisEscape,rubyNestedParentheses
|
||||
|
||||
" Generalized Double Quoted Strings, Symbols, Array of Strings, Array of Symbols and Shell Command Output {{{1
|
||||
" Generalized Double Quoted Strings, Array of Strings, Array of Symbols and Shell Command Output {{{1
|
||||
" Note: %= is not matched here as the beginning of a double quoted string
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial
|
||||
@@ -291,7 +292,6 @@ SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses
|
||||
SynFold '%' syn region rubyString matchgroup=rubyPercentStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial
|
||||
|
||||
" Array of interpolated Symbols
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial nextgroup=@rubyModifier skipwhite
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets
|
||||
@@ -299,15 +299,15 @@ SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%
|
||||
SynFold '%' syn region rubySymbol matchgroup=rubyPercentSymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses
|
||||
|
||||
" Here Documents {{{1
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyHeredocDelimiter start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"']\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})"'`]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyHeredocDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([]})]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyHeredocDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend
|
||||
@@ -321,8 +321,8 @@ syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyCon
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyOperator
|
||||
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyOperator
|
||||
|
||||
syn match rubyMethodName "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyMethodName "\%(\s\|^\)\@1<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
|
||||
syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration
|
||||
syn match rubyMethodName "\%(\s\|^\)\@1<=\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
|
||||
syn match rubyMethodName "\%([[:space:].]\|^\)\@1<=\%(\[\]=\=\|\*\*\|[-+!~]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
|
||||
|
||||
syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyMethodName,rubyBlockParameter
|
||||
@@ -330,12 +330,12 @@ syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,
|
||||
" Keywords {{{1
|
||||
" Note: the following keywords have already been defined:
|
||||
" begin case class def do end for if module unless until while
|
||||
syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|retry\|return\)\>[?!]\@!"
|
||||
syn match rubyOperator "\<defined?" display
|
||||
syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!"
|
||||
syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|retry\|return\)\>"
|
||||
syn match rubyKeyword "\<\%(super\|yield\)\>"
|
||||
syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__dir__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise
|
||||
syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<\(self\|nil\)\>[?!]\@!"
|
||||
syn match rubyPseudoVariable "\<__\%(ENCODING\|dir\|FILE\|LINE\|callee\|method\)__\>"
|
||||
syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>"
|
||||
|
||||
" Expensive Mode {{{1
|
||||
" Match 'end' with the appropriate opening keyword for syntax based folding
|
||||
@@ -362,26 +362,26 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
SynFold 'do' syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" curly bracket block or hash literal
|
||||
SynFold '{' syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop
|
||||
SynFold '[' syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
SynFold '{' syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop
|
||||
SynFold '[' syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<!\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" statements without 'do'
|
||||
SynFold 'begin' syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'case' syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold 'if' syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\<then\s\|\%(\<\h\w*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'if' syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\<then\s\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression
|
||||
syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression
|
||||
syn match rubyConditional "\<\%(then\|else\|when\)\>" contained containedin=rubyCaseExpression
|
||||
syn match rubyConditional "\<\%(then\|else\|elsif\)\>" contained containedin=rubyConditionalExpression
|
||||
|
||||
syn match rubyExceptionHandler "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression,rubyDoBlock
|
||||
syn match rubyExceptionHandler1 "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyModuleBlock,rubyClassBlock,rubyMethodBlock
|
||||
syn match rubyExceptionHandler "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyBlockExpression,rubyDoBlock
|
||||
syn match rubyExceptionHandler1 "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>" contained containedin=rubyModuleBlock,rubyClassBlock,rubyMethodBlock
|
||||
syn cluster rubyExceptionHandler contains=rubyExceptionHandler,rubyExceptionHandler1
|
||||
|
||||
" statements with optional 'do'
|
||||
syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\h\w*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\<do\>" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\<do\>" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
SynFold 'for' syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\h\w*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine
|
||||
SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine
|
||||
|
||||
if !exists("ruby_minlines")
|
||||
let ruby_minlines = 500
|
||||
@@ -389,28 +389,28 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
exe "syn sync minlines=" . ruby_minlines
|
||||
|
||||
else
|
||||
syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<module\>[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|rescue\|ensure\|then\|when\|end\)\>[?!]\@!"
|
||||
syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!"
|
||||
syn match rubyControl "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
|
||||
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|rescue\|ensure\|then\|when\|end\)\>"
|
||||
syn match rubyKeyword "\<\%(alias\|undef\)\>"
|
||||
endif
|
||||
|
||||
" Special Methods {{{1
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function
|
||||
" attr is a common variable name
|
||||
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
|
||||
syn keyword rubyAttribute attr_accessor attr_reader attr_writer
|
||||
syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
|
||||
syn keyword rubyEval eval class_eval instance_eval module_eval
|
||||
syn keyword rubyException raise fail catch throw
|
||||
syn keyword rubyInclude autoload gem load require require_relative
|
||||
syn keyword rubyKeyword callcc caller lambda proc
|
||||
" false positive with 'include?'
|
||||
syn match rubyMacro "\<include\>[?!]\@!"
|
||||
syn keyword rubyMacro extend prepend refine using
|
||||
syn keyword rubyMacro alias_method define_method define_singleton_method remove_method undef_method
|
||||
syn match rubyAccess "\<\%(public\|protected\|private\)\>"
|
||||
syn match rubyAccess "\<\%(public_class_method\|private_class_method\)\>"
|
||||
syn match rubyAccess "\<\%(public_constant\|private_constant\)\>"
|
||||
syn match rubyAccess "\<module_function\>"
|
||||
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" " attr is a common variable name
|
||||
syn match rubyAttribute "\<\%(attr_accessor\|attr_reader\|attr_writer\)\>"
|
||||
syn match rubyControl "\<\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>"
|
||||
syn match rubyEval "\<\%(eval\|class_eval\|instance_eval\|module_eval\)\>"
|
||||
syn match rubyException "\<\%(raise\|fail\|catch\|throw\)\>"
|
||||
syn match rubyInclude "\<\%(autoload\|gem\|load\|require\|require_relative\)\>"
|
||||
syn match rubyKeyword "\<\%(callcc\|caller\|lambda\|proc\)\>"
|
||||
syn match rubyMacro "\<\%(extend\|include\|prepend\|refine\|using\)\>"
|
||||
syn match rubyMacro "\<\%(alias_method\|define_method\|define_singleton_method\|remove_method\|undef_method\)\>"
|
||||
endif
|
||||
|
||||
" Comments and Documentation {{{1
|
||||
@@ -431,19 +431,25 @@ else
|
||||
syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
|
||||
endif
|
||||
|
||||
" {{{1 Useless line continuations
|
||||
syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|\w\@1<![?!]\)\s*\zs\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty
|
||||
syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained
|
||||
" {{{1 Useless Line Continuations
|
||||
syn match rubyUselessLineContinuation "\%([.:,;{([<>~\*%&^|+=-]\|%(\%(\w\|[^\x00-\x7F]\)\@1<![?!]\)\s*\zs\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty
|
||||
syn match rubyUselessLineContinuation "\\$" nextgroup=rubyUselessLineContinuation skipwhite skipempty contained
|
||||
|
||||
" Keyword Nobbling {{{1
|
||||
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\<\%(BEGIN\|END\)\>\)" transparent contains=NONE
|
||||
syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE
|
||||
" prevent methods with keyword names (and possible ?! suffixes) being highlighted as keywords when called
|
||||
syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|&\.\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\%(BEGIN\|END\)\>\)" transparent contains=rubyDotOperator,rubyScopeOperator
|
||||
syn match rubyKeywordAsMethod "\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE
|
||||
|
||||
" Bang/Predicate Special Methods and Operators {{{1
|
||||
if !exists("ruby_no_special_methods")
|
||||
syn match rubyControl "\<exit!" display
|
||||
endif
|
||||
syn match rubyOperator "\<defined?" display
|
||||
|
||||
" More Symbols {{{1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"he=e-1
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
|
||||
syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"hs=s+1,he=e-1
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-1
|
||||
|
||||
" __END__ Directive {{{1
|
||||
@@ -518,10 +524,10 @@ hi def link rubyTodo Todo
|
||||
hi def link rubyBackslashEscape rubyStringEscape
|
||||
hi def link rubyQuoteEscape rubyStringEscape
|
||||
hi def link rubySpaceEscape rubyStringEscape
|
||||
hi def link rubyParenthesesEscape rubyStringEscape
|
||||
hi def link rubyCurlyBracesEscape rubyStringEscape
|
||||
hi def link rubyAngleBracketsEscape rubyStringEscape
|
||||
hi def link rubySquareBracketsEscape rubyStringEscape
|
||||
hi def link rubyParenthesisEscape rubyStringEscape
|
||||
hi def link rubyCurlyBraceEscape rubyStringEscape
|
||||
hi def link rubyAngleBracketEscape rubyStringEscape
|
||||
hi def link rubySquareBracketEscape rubyStringEscape
|
||||
hi def link rubyStringEscape Special
|
||||
|
||||
hi def link rubyInterpolationDelimiter Delimiter
|
||||
|
||||
@@ -51,7 +51,7 @@ syn cluster scssSelectors contains=@comment,cssSelectorOp,cssTagName,cssPseudoCl
|
||||
syn match scssProperty "\([[:alnum:]-]\)\+\s*\(:\)\@=" contained contains=css.*Prop,cssVendor containedin=cssMediaBlock nextgroup=scssAttribute,scssAttributeWithNestedDefinition
|
||||
syn match scssAttribute ":[^;]*\ze\(;\|}\)" contained contains=css.*Attr,cssValue.*,cssColor,cssFunction,cssString.*,cssURL,scssFunction,scssInterpolation,scssVariable
|
||||
|
||||
syn match scssAttributeWithNestedDefinition ": [^#]*{\@=" nextgroup=scssNestedDefinition contained contains=css.*Attr,cssValue.*,scssVariable
|
||||
syn match scssAttributeWithNestedDefinition ": [^#"]*{\@=" nextgroup=scssNestedDefinition contained contains=css.*Attr,cssValue.*,scssVariable
|
||||
syn region scssNestedDefinition matchgroup=cssBraces start="{" end="}" contained contains=@comment,scssProperty,scssNestedProperty
|
||||
|
||||
" CSS properties from https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
|
||||
|
||||
179
syntax/smt2.vim
Normal file
179
syntax/smt2.vim
Normal file
@@ -0,0 +1,179 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'smt2') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" " Language: SMT-LIB2 with Z3's extensions
|
||||
" " Maintainer: Dimitri Bohlender <bohlender@embedded.rwth-aachen.de>
|
||||
|
||||
" Quit if a syntax file is already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = "smt2"
|
||||
|
||||
" Comments
|
||||
syntax match smt2Comment ";.*$"
|
||||
|
||||
" Keywords
|
||||
syntax keyword smt2Keyword
|
||||
\ apply
|
||||
\ as
|
||||
\ assert
|
||||
\ assert
|
||||
\ assert-soft
|
||||
\ check-sat
|
||||
\ check-sat-using
|
||||
\ declare-const
|
||||
\ declare-datatype
|
||||
\ declare-datatypes
|
||||
\ declare-fun
|
||||
\ declare-map
|
||||
\ declare-rel
|
||||
\ declare-sort
|
||||
\ declare-var
|
||||
\ define-const
|
||||
\ define-fun
|
||||
\ define-sort
|
||||
\ display
|
||||
\ echo
|
||||
\ elim-quantifiers
|
||||
\ eval
|
||||
\ exists
|
||||
\ exit
|
||||
\ forall
|
||||
\ get-assignment
|
||||
\ get-info
|
||||
\ get-model
|
||||
\ get-option
|
||||
\ get-proof
|
||||
\ get-unsat-core
|
||||
\ get-user-tactics
|
||||
\ get-value
|
||||
\ help
|
||||
\ let
|
||||
\ match
|
||||
\ maximize
|
||||
\ minimize
|
||||
\ pop
|
||||
\ push
|
||||
\ query
|
||||
\ reset
|
||||
\ rule
|
||||
\ set-info
|
||||
\ set-logic
|
||||
\ set-option
|
||||
\ simplify
|
||||
syntax match smt2Keyword "!"
|
||||
|
||||
" Operators
|
||||
syntax match smt2Operator "[=\|>\|<\|<=\|>=\|=>\|+\|\-\|*\|/]"
|
||||
|
||||
" Builtins
|
||||
syntax keyword smt2Builtin
|
||||
\ and
|
||||
\ bit0
|
||||
\ bit1
|
||||
\ bvadd
|
||||
\ bvand
|
||||
\ bvashr
|
||||
\ bvcomp
|
||||
\ bvlshr
|
||||
\ bvmul
|
||||
\ bvnand
|
||||
\ bvneg
|
||||
\ bvnor
|
||||
\ bvnot
|
||||
\ bvor
|
||||
\ bvredand
|
||||
\ bvredor
|
||||
\ bvsdiv
|
||||
\ bvsge
|
||||
\ bvsgt
|
||||
\ bvshl
|
||||
\ bvsle
|
||||
\ bvslt
|
||||
\ bvsmod
|
||||
\ bvsrem
|
||||
\ bvsub
|
||||
\ bvudiv
|
||||
\ bvuge
|
||||
\ bvugt
|
||||
\ bvule
|
||||
\ bvult
|
||||
\ bvurem
|
||||
\ bvxnor
|
||||
\ bvxor
|
||||
\ concat
|
||||
\ const
|
||||
\ distinct
|
||||
\ div
|
||||
\ extract
|
||||
\ false
|
||||
\ get-assertions
|
||||
\ if
|
||||
\ is_int
|
||||
\ ite
|
||||
\ map
|
||||
\ mod
|
||||
\ not
|
||||
\ or
|
||||
\ rem
|
||||
\ repeat
|
||||
\ root-obj
|
||||
\ rotate_left
|
||||
\ rotate_right
|
||||
\ sat
|
||||
\ sat
|
||||
\ select
|
||||
\ sign_extend
|
||||
\ store
|
||||
\ to_int
|
||||
\ to_real
|
||||
\ true
|
||||
\ unsat
|
||||
\ unsat
|
||||
\ xor
|
||||
\ zero_extend
|
||||
syntax match smt2Builtin "[\^\~]"
|
||||
|
||||
" Identifier
|
||||
syntax match smt2Identifier "\<[a-z_][a-zA-Z0-9_\-\.']*\>"
|
||||
|
||||
" Types
|
||||
syntax match smt2Type "\<[A-Z][a-zA-Z0-9_\-\.']*\>"
|
||||
|
||||
" Strings
|
||||
syntax region smt2String start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syntax match smt2Option "\<:[a-zA-Z0-9_\-\.']*\>"
|
||||
|
||||
" Constructors
|
||||
syntax match smt2Constructor "\<\$[a-zA-Z0-9_\-\.']*\>"
|
||||
|
||||
" Number
|
||||
syntax match smt2Int "\<[0-9]\+\>"
|
||||
syntax match smt2Hex "\<[0#][xX][0-9a-fA-F]\+\>"
|
||||
syntax match smt2Binary "\<#b[01]\+\>"
|
||||
syntax match smt2Float "\<[0-9]\+\.[0-9]\+\([eE][\-+]\=[0-9]\+\)\=\>"
|
||||
|
||||
" Delimiter
|
||||
syntax match smt2Delimiter "[()]"
|
||||
|
||||
" Error
|
||||
syntax keyword smt2Error error
|
||||
|
||||
highlight def link smt2Comment Comment
|
||||
highlight def link smt2Keyword Function
|
||||
highlight def link smt2Operator Operator
|
||||
highlight def link smt2Builtin Operator
|
||||
highlight def link smt2Identifier Normal
|
||||
highlight def link smt2Type Type
|
||||
highlight def link smt2String String
|
||||
highlight def link smt2Option PreProc
|
||||
highlight def link smt2Constructor Function
|
||||
highlight def link smt2Float Float
|
||||
highlight def link smt2Hex Number
|
||||
highlight def link smt2Binary Number
|
||||
highlight def link smt2Int Number
|
||||
highlight def link smt2Delimiter Delimiter
|
||||
highlight def link smt2Error Error
|
||||
58
syntax/tablegen.vim
Normal file
58
syntax/tablegen.vim
Normal file
@@ -0,0 +1,58 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: TableGen
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
" Version: $Revision$
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" May be changed if you have a really slow machine
|
||||
syntax sync minlines=100
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword tgKeyword def let in code dag field include defm foreach
|
||||
syn keyword tgType class int string list bit bits multiclass
|
||||
|
||||
syn match tgNumber /\<\d\+\>/
|
||||
syn match tgNumber /\<\d\+\.\d*\>/
|
||||
syn match tgNumber /\<0b[01]\+\>/
|
||||
syn match tgNumber /\<0x[0-9a-fA-F]\+\>/
|
||||
syn region tgString start=/"/ skip=/\\"/ end=/"/ oneline
|
||||
|
||||
syn region tgCode start=/\[{/ end=/}\]/
|
||||
|
||||
syn keyword tgTodo contained TODO FIXME
|
||||
syn match tgComment /\/\/.*$/ contains=tgTodo
|
||||
" Handle correctly imbricated comment
|
||||
syn region tgComment2 matchgroup=tgComment2 start=+/\*+ end=+\*/+ contains=tgTodo,tgComment2
|
||||
|
||||
if version >= 508 || !exists("did_c_syn_inits")
|
||||
if version < 508
|
||||
let did_c_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink tgKeyword Statement
|
||||
HiLink tgType Type
|
||||
HiLink tgNumber Number
|
||||
HiLink tgComment Comment
|
||||
HiLink tgComment2 Comment
|
||||
HiLink tgString String
|
||||
" May find a better Hilight group...
|
||||
HiLink tgCode Special
|
||||
HiLink tgTodo Todo
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "tablegen"
|
||||
@@ -29,6 +29,7 @@ syn keyword terraDataTypeBI
|
||||
\ alicloud_cen_instances
|
||||
\ alicloud_cen_region_route_entries
|
||||
\ alicloud_cen_route_entries
|
||||
\ alicloud_cs_kubernetes_clusters
|
||||
\ alicloud_db_instances
|
||||
\ alicloud_disks
|
||||
\ alicloud_dns_domain_groups
|
||||
@@ -401,6 +402,7 @@ syn keyword terraDataTypeBI
|
||||
\ google_organization
|
||||
\ google_project
|
||||
\ google_project_services
|
||||
\ google_projects
|
||||
\ google_service_account
|
||||
\ google_service_account_key
|
||||
\ google_storage_bucket_object
|
||||
@@ -471,6 +473,24 @@ syn keyword terraDataTypeBI
|
||||
\ logentries_logset
|
||||
\ logicmonitor_collectors
|
||||
\ logicmonitor_device_group
|
||||
\ ncloud_access_control_group
|
||||
\ ncloud_access_control_groups
|
||||
\ ncloud_access_control_rule
|
||||
\ ncloud_access_control_rules
|
||||
\ ncloud_member_server_image
|
||||
\ ncloud_member_server_images
|
||||
\ ncloud_nas_volume
|
||||
\ ncloud_nas_volumes
|
||||
\ ncloud_port_forwarding_rule
|
||||
\ ncloud_port_forwarding_rules
|
||||
\ ncloud_public_ip
|
||||
\ ncloud_regions
|
||||
\ ncloud_root_password
|
||||
\ ncloud_server_image
|
||||
\ ncloud_server_images
|
||||
\ ncloud_server_product
|
||||
\ ncloud_server_products
|
||||
\ ncloud_zones
|
||||
\ newrelic_alert_channel
|
||||
\ newrelic_alert_policy
|
||||
\ newrelic_application
|
||||
@@ -502,6 +522,12 @@ syn keyword terraDataTypeBI
|
||||
\ nutanix_volume_groups
|
||||
\ oci_audit_configuration
|
||||
\ oci_audit_events
|
||||
\ oci_autoscaling_auto_scaling_configuration
|
||||
\ oci_autoscaling_auto_scaling_configurations
|
||||
\ oci_budget_alert_rule
|
||||
\ oci_budget_alert_rules
|
||||
\ oci_budget_budget
|
||||
\ oci_budget_budgets
|
||||
\ oci_containerengine_cluster_kube_config
|
||||
\ oci_containerengine_cluster_option
|
||||
\ oci_containerengine_clusters
|
||||
@@ -609,6 +635,7 @@ syn keyword terraDataTypeBI
|
||||
\ oci_database_db_system_shapes
|
||||
\ oci_database_db_systems
|
||||
\ oci_database_db_versions
|
||||
\ oci_database_exadata_iorm_config
|
||||
\ oci_dns_records
|
||||
\ oci_dns_steering_policies
|
||||
\ oci_dns_steering_policy
|
||||
@@ -633,6 +660,8 @@ syn keyword terraDataTypeBI
|
||||
\ oci_health_checks_vantage_points
|
||||
\ oci_identity_api_keys
|
||||
\ oci_identity_auth_tokens
|
||||
\ oci_identity_authentication_policy
|
||||
\ oci_identity_availability_domain
|
||||
\ oci_identity_availability_domains
|
||||
\ oci_identity_compartment
|
||||
\ oci_identity_compartments
|
||||
@@ -648,6 +677,8 @@ syn keyword terraDataTypeBI
|
||||
\ oci_identity_regions
|
||||
\ oci_identity_smtp_credentials
|
||||
\ oci_identity_swift_passwords
|
||||
\ oci_identity_tag_default
|
||||
\ oci_identity_tag_defaults
|
||||
\ oci_identity_tag_namespaces
|
||||
\ oci_identity_tags
|
||||
\ oci_identity_tenancy
|
||||
@@ -677,6 +708,12 @@ syn keyword terraDataTypeBI
|
||||
\ oci_load_balancer_rule_sets
|
||||
\ oci_load_balancer_shapes
|
||||
\ oci_load_balancers
|
||||
\ oci_monitoring_alarm
|
||||
\ oci_monitoring_alarm_history_collection
|
||||
\ oci_monitoring_alarm_statuses
|
||||
\ oci_monitoring_alarms
|
||||
\ oci_monitoring_metric_data
|
||||
\ oci_monitoring_metrics
|
||||
\ oci_objectstorage_bucket
|
||||
\ oci_objectstorage_bucket_summaries
|
||||
\ oci_objectstorage_namespace
|
||||
@@ -687,6 +724,10 @@ syn keyword terraDataTypeBI
|
||||
\ oci_objectstorage_objects
|
||||
\ oci_objectstorage_preauthrequest
|
||||
\ oci_objectstorage_preauthrequests
|
||||
\ oci_ons_notification_topic
|
||||
\ oci_ons_notification_topics
|
||||
\ oci_ons_subscription
|
||||
\ oci_ons_subscriptions
|
||||
\ oci_streaming_stream
|
||||
\ oci_streaming_streams
|
||||
\ oneandone_instance_size
|
||||
@@ -874,6 +915,7 @@ syn keyword terraDataTypeBI
|
||||
\ triton_package
|
||||
\ ucloud_eips
|
||||
\ ucloud_images
|
||||
\ ucloud_instances
|
||||
\ ucloud_projects
|
||||
\ ucloud_zones
|
||||
\ vault_approle_auth_backend_role_id
|
||||
@@ -921,6 +963,8 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_api_gateway_group
|
||||
\ alicloud_api_gateway_vpc_access
|
||||
\ alicloud_cdn_domain
|
||||
\ alicloud_cdn_domain_config
|
||||
\ alicloud_cdn_domain_new
|
||||
\ alicloud_cen_bandwidth_limit
|
||||
\ alicloud_cen_bandwidth_package
|
||||
\ alicloud_cen_bandwidth_package_attachment
|
||||
@@ -931,6 +975,7 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_common_bandwidth_package
|
||||
\ alicloud_common_bandwidth_package_attachment
|
||||
\ alicloud_container_cluster
|
||||
\ alicloud_cr_namespace
|
||||
\ alicloud_cs_application
|
||||
\ alicloud_cs_kubernetes
|
||||
\ alicloud_cs_managed_kubernetes
|
||||
@@ -983,6 +1028,10 @@ syn keyword terraResourceTypeBI
|
||||
\ alicloud_mns_queue
|
||||
\ alicloud_mns_topic
|
||||
\ alicloud_mns_topic_subscription
|
||||
\ alicloud_nas_access_group
|
||||
\ alicloud_nas_access_rule
|
||||
\ alicloud_nas_file_system
|
||||
\ alicloud_nas_mount_target
|
||||
\ alicloud_nat_gateway
|
||||
\ alicloud_network_interface
|
||||
\ alicloud_network_interface_attachment
|
||||
@@ -1394,6 +1443,7 @@ syn keyword terraResourceTypeBI
|
||||
\ aws_route53_health_check
|
||||
\ aws_route53_query_log
|
||||
\ aws_route53_record
|
||||
\ aws_route53_resolver_endpoint
|
||||
\ aws_route53_zone
|
||||
\ aws_route53_zone_association
|
||||
\ aws_route_table
|
||||
@@ -1538,6 +1588,8 @@ syn keyword terraResourceTypeBI
|
||||
\ azurerm_api_management_group
|
||||
\ azurerm_api_management_group_user
|
||||
\ azurerm_api_management_product
|
||||
\ azurerm_api_management_product_group
|
||||
\ azurerm_api_management_property
|
||||
\ azurerm_api_management_user
|
||||
\ azurerm_app_service
|
||||
\ azurerm_app_service_active_slot
|
||||
@@ -2119,6 +2171,7 @@ syn keyword terraResourceTypeBI
|
||||
\ google_dataproc_cluster
|
||||
\ google_dataproc_job
|
||||
\ google_dns_managed_zone
|
||||
\ google_dns_policy
|
||||
\ google_dns_record_set
|
||||
\ google_endpoints_service
|
||||
\ google_filestore_instance
|
||||
@@ -2204,6 +2257,7 @@ syn keyword terraResourceTypeBI
|
||||
\ google_storage_object_access_control
|
||||
\ google_storage_object_acl
|
||||
\ google_storage_transfer_job
|
||||
\ google_tpu_node
|
||||
\ grafana_alert_notification
|
||||
\ grafana_dashboard
|
||||
\ grafana_data_source
|
||||
@@ -2348,6 +2402,7 @@ syn keyword terraResourceTypeBI
|
||||
\ kubernetes_config_map
|
||||
\ kubernetes_daemonset
|
||||
\ kubernetes_deployment
|
||||
\ kubernetes_endpoint
|
||||
\ kubernetes_horizontal_pod_autoscaler
|
||||
\ kubernetes_limit_range
|
||||
\ kubernetes_namespace
|
||||
@@ -2393,6 +2448,15 @@ syn keyword terraResourceTypeBI
|
||||
\ mysql_role
|
||||
\ mysql_user
|
||||
\ mysql_user_password
|
||||
\ ncloud_block_storage
|
||||
\ ncloud_block_storage_snapshot
|
||||
\ ncloud_load_balancer
|
||||
\ ncloud_load_balancer_ssl_certificate
|
||||
\ ncloud_login_key
|
||||
\ ncloud_nas_volume
|
||||
\ ncloud_port_forwarding_rule
|
||||
\ ncloud_public_ip
|
||||
\ ncloud_server
|
||||
\ netlify_build_hook
|
||||
\ netlify_deploy_key
|
||||
\ netlify_hook
|
||||
@@ -2486,6 +2550,9 @@ syn keyword terraResourceTypeBI
|
||||
\ nutanix_virtual_machine
|
||||
\ nutanix_volume_group
|
||||
\ oci_audit_configuration
|
||||
\ oci_autoscaling_auto_scaling_configuration
|
||||
\ oci_budget_alert_rule
|
||||
\ oci_budget_budget
|
||||
\ oci_containerengine_cluster
|
||||
\ oci_containerengine_node_pool
|
||||
\ oci_core_app_catalog_listing_resource_version
|
||||
@@ -2540,6 +2607,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_database_backup
|
||||
\ oci_database_db_home
|
||||
\ oci_database_db_system
|
||||
\ oci_database_exadata_iorm_config
|
||||
\ oci_dns_record
|
||||
\ oci_dns_steering_policy
|
||||
\ oci_dns_steering_policy_attachment
|
||||
@@ -2557,6 +2625,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_health_checks_ping_probe
|
||||
\ oci_identity_api_key
|
||||
\ oci_identity_auth_token
|
||||
\ oci_identity_authentication_policy
|
||||
\ oci_identity_compartment
|
||||
\ oci_identity_customer_secret_key
|
||||
\ oci_identity_dynamic_group
|
||||
@@ -2567,6 +2636,7 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_identity_smtp_credential
|
||||
\ oci_identity_swift_password
|
||||
\ oci_identity_tag
|
||||
\ oci_identity_tag_default
|
||||
\ oci_identity_tag_namespace
|
||||
\ oci_identity_ui_password
|
||||
\ oci_identity_user
|
||||
@@ -2587,11 +2657,14 @@ syn keyword terraResourceTypeBI
|
||||
\ oci_load_balancer_load_balancer
|
||||
\ oci_load_balancer_path_route_set
|
||||
\ oci_load_balancer_rule_set
|
||||
\ oci_monitoring_alarm
|
||||
\ oci_objectstorage_bucket
|
||||
\ oci_objectstorage_namespace_metadata
|
||||
\ oci_objectstorage_object
|
||||
\ oci_objectstorage_object_lifecycle_policy
|
||||
\ oci_objectstorage_preauthrequest
|
||||
\ oci_ons_notification_topic
|
||||
\ oci_ons_subscription
|
||||
\ oci_streaming_stream
|
||||
\ oneandone_baremetal
|
||||
\ oneandone_block_storage
|
||||
@@ -3138,6 +3211,7 @@ syn keyword terraResourceTypeBI
|
||||
\ triton_service_group
|
||||
\ triton_snapshot
|
||||
\ triton_vlan
|
||||
\ ucloud_db_instance
|
||||
\ ucloud_disk
|
||||
\ ucloud_disk_attachment
|
||||
\ ucloud_eip
|
||||
@@ -3147,6 +3221,8 @@ syn keyword terraResourceTypeBI
|
||||
\ ucloud_lb_attachment
|
||||
\ ucloud_lb_listener
|
||||
\ ucloud_lb_rule
|
||||
\ ucloud_lb_ssl
|
||||
\ ucloud_lb_ssl_attachment
|
||||
\ ucloud_security_group
|
||||
\ ucloud_subnet
|
||||
\ ucloud_udpn_connection
|
||||
@@ -3199,6 +3275,7 @@ syn keyword terraResourceTypeBI
|
||||
\ vault_ldap_auth_backend_group
|
||||
\ vault_ldap_auth_backend_user
|
||||
\ vault_mount
|
||||
\ vault_namespace
|
||||
\ vault_okta_auth_backend
|
||||
\ vault_okta_auth_backend_group
|
||||
\ vault_okta_auth_backend_user
|
||||
|
||||
Reference in New Issue
Block a user