summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--after/syntax/jsx_pretty.vim16
-rw-r--r--autoload/csv.vim33
-rw-r--r--autoload/go/config.vim6
-rw-r--r--autoload/jsx_pretty/indent.vim16
-rw-r--r--indent/ruby.vim1
-rw-r--r--syntax/dhall.vim2
-rw-r--r--syntax/zig.vim2
7 files changed, 40 insertions, 36 deletions
diff --git a/after/syntax/jsx_pretty.vim b/after/syntax/jsx_pretty.vim
index 1f1c2567..546e9d48 100644
--- a/after/syntax/jsx_pretty.vim
+++ b/after/syntax/jsx_pretty.vim
@@ -20,7 +20,7 @@ syntax region jsxTag
\ matchgroup=NONE
\ end=+\%(/\_s*>\)\@=+
\ contained
- \ contains=jsxOpenTag,jsxAttrib,jsxEscapeJs,jsxSpreadOperator,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment
+ \ contains=jsxOpenTag,jsxAttrib,jsxExpressionBlock,jsxSpreadOperator,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment
\ keepend
\ extend
\ skipwhite
@@ -39,7 +39,7 @@ syntax region jsxElement
\ start=+<\_s*\%(>\|\${\|\z(\<[-:._$A-Za-z0-9]\+\>\)\)+
\ end=+/\_s*>+
\ end=+<\_s*/\_s*\z1\_s*>+
- \ contains=jsxElement,jsxTag,jsxEscapeJs,jsxComment,jsxCloseTag,@Spell
+ \ contains=jsxElement,jsxTag,jsxExpressionBlock,jsxComment,jsxCloseTag,@Spell
\ keepend
\ extend
\ contained
@@ -66,7 +66,7 @@ exe 'syntax region jsxOpenTag
" <tag key={this.props.key}>
" ~~~~~~~~~~~~~~~~
-syntax region jsxEscapeJs
+syntax region jsxExpressionBlock
\ matchgroup=jsxBraces
\ start=+{+
\ end=+}+
@@ -84,7 +84,7 @@ syntax match jsxNamespace +:+ contained
" <tag id="sample">
" ~
-syntax match jsxEqual +=+ contained skipwhite skipempty nextgroup=jsxString,jsxEscapeJs,jsxRegion
+syntax match jsxEqual +=+ contained skipwhite skipempty nextgroup=jsxString,jsxExpressionBlock,jsxRegion
" <tag />
" ~~
@@ -154,10 +154,10 @@ if s:enable_tagged_jsx
\ end=+`+
\ extend
\ contained
- \ contains=jsxElement,jsxEscapeJs
+ \ contains=jsxElement,jsxExpressionBlock
\ transparent
- syntax region jsxEscapeJs
+ syntax region jsxExpressionBlock
\ matchgroup=jsxBraces
\ start=+\${+
\ end=+}+
@@ -171,14 +171,14 @@ if s:enable_tagged_jsx
\ matchgroup=NONE
\ end=+}\@1<=+
\ contained
- \ contains=jsxEscapeJs
+ \ contains=jsxExpressionBlock
\ skipwhite
\ skipempty
\ nextgroup=jsxAttrib,jsxSpreadOperator
syntax keyword jsxAttribKeyword class contained
- syntax match jsxSpreadOperator +\.\.\.+ contained nextgroup=jsxEscapeJs skipwhite
+ syntax match jsxSpreadOperator +\.\.\.+ contained nextgroup=jsxExpressionBlock skipwhite
syntax match jsxCloseTag +<//>+ contained
diff --git a/autoload/csv.vim b/autoload/csv.vim
index d807e729..a035e3d5 100644
--- a/autoload/csv.vim
+++ b/autoload/csv.vim
@@ -122,7 +122,7 @@ fu! csv#Init(start, end, ...) "{{{3
" Enable vartabs for tab delimited files
if b:delimiter=="\t" && has("vartabs")&& !exists("b:csv_fixed_width_cols")
if get(b:, 'col_width', []) ==# []
- call csv#CalculateColumnWidth('')
+ call csv#CalculateColumnWidth(line('$'))
endif
let &l:vts=join(b:col_width, ',')
let g:csv_no_conceal=1
@@ -574,7 +574,7 @@ fu! csv#MaxColumns(...) "{{{3
return len(b:csv_fixed_width_cols)
endif
endfu
-fu! csv#ColWidth(colnr, ...) "{{{3
+fu! csv#ColWidth(colnr, row, silent) "{{{3
" if a:1 is given, specifies the row, for which to calculate the width
"
" Return the width of a column
@@ -586,14 +586,13 @@ fu! csv#ColWidth(colnr, ...) "{{{3
if !exists("b:csv_fixed_width_cols")
if !exists("b:csv_list")
" only check first 10000 lines, to be faster
- let last = line('$')
- if exists("a:1") && !empty(a:1)
- let last = a:1
- endif
+ let last = a:row
if !get(b:, 'csv_arrange_use_all_rows', 0)
if last > 10000
let last = 10000
- call csv#Warn('File too large, only checking the first 10000 rows for the width')
+ if !a:silent
+ call csv#Warn('File too large, only checking the first 10000 rows for the width')
+ endif
endif
endif
let b:csv_list=getline(skipfirst+1,last)
@@ -750,7 +749,7 @@ fu! csv#UnArrangeCol(match) "{{{3
" Strip leading white space, also trims empty recordcsv#
return substitute(a:match, '\%(^ \+\)\|\%( \+\ze'.b:delimiter. '\?$\)', '', 'g')
endfu
-fu! csv#CalculateColumnWidth(row) "{{{3
+fu! csv#CalculateColumnWidth(row, silent) "{{{3
" Internal function, not called from external,
" does not work with fixed width columns
" row for the row for which to calculate the width
@@ -763,7 +762,7 @@ fu! csv#CalculateColumnWidth(row) "{{{3
endif
let s:max_cols=csv#MaxColumns(line('.'))
for i in range(1,s:max_cols)
- call add(b:col_width, csv#ColWidth(i, a:row))
+ call add(b:col_width, csv#ColWidth(i, a:row, a:silent))
endfor
catch /csv:no_col/
call csv#Warn("Error: getting Column numbers, aborting!")
@@ -1053,7 +1052,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
let maxcol=csv#MaxColumns(line('.'))
let cpos=getpos('.')[2]
if !exists("b:csv_fixed_width_cols")
- let curwidth=CSVWidth()
+ let curwidth=CSVWidth(1)
call search(b:col, 'bc', line('.'))
endif
let spos=getpos('.')[2]
@@ -1146,7 +1145,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
" leave the column (if the next column is shorter)
if !exists("b:csv_fixed_width_cols")
let a = getpos('.')
- if CSVWidth() == curwidth
+ if CSVWidth(1) == curwidth
let a[2]+= cpos-spos
endif
else
@@ -1159,7 +1158,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
" Move to the correct screen column
if !exists("b:csv_fixed_width_cols")
let a = getpos('.')
- if CSVWidth() == curwidth
+ if CSVWidth(1) == curwidth
let a[2]+= cpos-spos
endif
else
@@ -1835,7 +1834,7 @@ fu! csv#ProcessFieldValue(field) "{{{3
if a == b:delimiter
try
- let a=repeat(' ', csv#ColWidth(col))
+ let a=repeat(' ', csv#ColWidth(col, line('$'), 1))
catch
" no-op
endtry
@@ -2134,7 +2133,7 @@ fu! csv#NewRecord(line1, line2, count) "{{{3
if !exists("b:col_width")
" Best guess width
if exists("b:csv_fixed_width_cols")
- let record .= printf("%*s", csv#ColWidth(item),
+ let record .= printf("%*s", csv#ColWidth(item, line('$'), 1),
\ b:delimiter)
else
let record .= printf("%20s", b:delimiter)
@@ -3145,7 +3144,9 @@ fu! CSVCount(col, fmt, first, last, ...) "{{{3
unlet! s:additional['distinct']
return (empty(result) ? 0 : result)
endfu
-fu! CSVWidth() "{{{3
+fu! CSVWidth(...) "{{{3
+ " do not output any warning
+ let silent = get(a:000, 0, 1)
" does not work with fixed width columns
if exists("b:csv_fixed_width_cols")
let c = getline(1,'$')
@@ -3164,7 +3165,7 @@ fu! CSVWidth() "{{{3
" Add width for last column
call add(width, max-y+1)
else
- call csv#CalculateColumnWidth('')
+ call csv#CalculateColumnWidth(line('$'), silent)
let width=map(copy(b:col_width), 'v:val-1')
endif
return width
diff --git a/autoload/go/config.vim b/autoload/go/config.vim
index 9cd032f2..3dc4422f 100644
--- a/autoload/go/config.vim
+++ b/autoload/go/config.vim
@@ -353,7 +353,7 @@ function! go#config#FmtCommand() abort
endfunction
function! go#config#FmtOptions() abort
- return get(g:, "go_fmt_options", {})
+ return get(b:, "go_fmt_options", get(g:, "go_fmt_options", {}))
endfunction
function! go#config#FmtFailSilently() abort
@@ -368,9 +368,9 @@ function! go#config#PlayOpenBrowser() abort
return get(g:, "go_play_open_browser", 1)
endfunction
-function! go#config#GorenameCommand() abort
+function! go#config#RenameCommand() abort
" delegate to go#config#GorenameBin for backwards compatability.
- return get(g:, "go_gorename_command", go#config#GorenameBin())
+ return get(g:, "go_rename_command", go#config#GorenameBin())
endfunction
function! go#config#GorenameBin() abort
diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim
index b3b1e5c1..3def1131 100644
--- a/autoload/jsx_pretty/indent.vim
+++ b/autoload/jsx_pretty/indent.vim
@@ -70,9 +70,9 @@ function s:is_jsx_element(syntax)
return a:syntax =~? 'jsxElement'
endfunction
-" Whether the specified syntax group is the jsxEscapeJs
-function s:is_jsx_escape(syntax)
- return a:syntax =~? 'jsxEscapeJs'
+" Whether the specified syntax group is the jsxExpressionBlock
+function s:is_jsx_expression(syntax)
+ return a:syntax =~? 'jsxExpressionBlock'
endfunction
" Whether the specified syntax group is the jsxBraces
@@ -191,7 +191,7 @@ endfunction
" - jsxRegion
" - jsxTaggedRegion
" - jsxElement
-" - jsxEscapeJs
+" - jsxExpressionBlock
" - Other
function s:syntax_context(lnum)
let start_col = s:start_col(a:lnum)
@@ -201,9 +201,9 @@ function s:syntax_context(lnum)
let i = 0
for syntax_name in reversed
- " If the current line is jsxEscapeJs and not starts with jsxBraces
- if s:is_jsx_escape(syntax_name)
- return 'jsxEscapeJs'
+ " If the current line is jsxExpressionBlock and not starts with jsxBraces
+ if s:is_jsx_expression(syntax_name)
+ return 'jsxExpressionBlock'
endif
if s:is_jsx_region(syntax_name)
@@ -287,7 +287,7 @@ function! jsx_pretty#indent#get(js_indent)
endif
return s:jsx_indent_element(v:lnum)
- elseif syntax_context == 'jsxEscapeJs'
+ elseif syntax_context == 'jsxExpressionBlock'
let prev_lnum = s:prev_lnum(v:lnum)
let prev_line = s:trim(getline(prev_lnum))
diff --git a/indent/ruby.vim b/indent/ruby.vim
index 4639d507..0628a24b 100644
--- a/indent/ruby.vim
+++ b/indent/ruby.vim
@@ -66,6 +66,7 @@ let s:syng_strcom = s:syng_stringdoc + [
\ 'PercentStringDelimiter',
\ 'PercentSymbolDelimiter',
\ 'Regexp',
+ \ 'RegexpCharClass',
\ 'RegexpDelimiter',
\ 'RegexpEscape',
\ 'StringDelimiter',
diff --git a/syntax/dhall.vim b/syntax/dhall.vim
index 729daac1..dbbb43d1 100644
--- a/syntax/dhall.vim
+++ b/syntax/dhall.vim
@@ -39,6 +39,7 @@ syntax region dhallString start=+''+ end=+''+ contains=@Spell,dhallInterpolation
syntax region dhallString start=+"+ end=+"+ contains=dhallInterpolation,dhallEsc
syntax region dhallString start=+"/+ end=+"+ contains=dhallInterpolation,dhallEsc
syntax keyword dhallBool True False
+syntax match dhallHash "sha256:[a-f0-9]+"
highlight link dhallSingleSpecial Special
highlight link dhallIndex Special
@@ -60,6 +61,7 @@ highlight link dhallType Structure
highlight link dhallParens Special
highlight link dhallComment Comment
highlight link dhallMultilineComment Comment
+highlight link dhallHash Keyword
let b:current_syntax = 'dhall'
diff --git a/syntax/zig.vim b/syntax/zig.vim
index 1fade5cd..3b559f49 100644
--- a/syntax/zig.vim
+++ b/syntax/zig.vim
@@ -43,7 +43,7 @@ syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"
syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"
syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl|hasField)>"
syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|sqrt|byteSwap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>"
-syn match zigBuiltinFn "\v\@(truncate|typeId|typeInfo|typeName|typeOf|atomicRmw|bytesToSlice|sliceToBytes)>"
+syn match zigBuiltinFn "\v\@(truncate|typeId|typeInfo|typeName|TypeOf|atomicRmw|bytesToSlice|sliceToBytes)>"
syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>"
syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|ln|log2|log10|fabs|floor|ceil|trunc|round)>"