mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-20 01:13:41 -05:00
Run scripts/build with changes
This commit is contained in:
@@ -18,7 +18,7 @@ setlocal indentkeys-=0{
|
||||
setlocal indentkeys-=0}
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk< si<"
|
||||
let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys< smartindent<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetJuliaIndent")
|
||||
@@ -294,7 +294,7 @@ function IsInContinuationImportLine(lnum)
|
||||
if len(stack) == 0
|
||||
return 0
|
||||
endif
|
||||
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\)\>', indent(a:lnum)) == -1
|
||||
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\|public\)\>', indent(a:lnum)) == -1
|
||||
endfunction
|
||||
|
||||
function IsFunctionArgPar(lnum, c)
|
||||
@@ -444,10 +444,10 @@ function GetJuliaIndent()
|
||||
" Decrease indentation for each closed block in the current line
|
||||
let ind -= shiftwidth() * num_closed_blocks
|
||||
|
||||
" Additional special case: multiline import/using/export statements
|
||||
" Additional special case: multiline import/using/export/public statements
|
||||
|
||||
let prevline = getline(lnum)
|
||||
" Are we in a multiline import/using/export statement, right below the
|
||||
" Are we in a multiline import/using/export/public statement, right below the
|
||||
" opening line?
|
||||
if IsInContinuationImportLine(v:lnum) && !IsInContinuationImportLine(lnum)
|
||||
if get(g:, 'julia_indent_align_import', 1)
|
||||
@@ -461,9 +461,9 @@ function GetJuliaIndent()
|
||||
return cind + 2
|
||||
endif
|
||||
else
|
||||
" if the opening line is not a naked import/using/export statement, use
|
||||
" if the opening line is not a naked import/using/export/public statement, use
|
||||
" it as reference
|
||||
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim)
|
||||
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\|public\>', indent(lnum), lim)
|
||||
if iind >= 0
|
||||
" assuming whitespace after using... so no `using(XYZ)` please!
|
||||
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6, -1, 'basic')
|
||||
@@ -475,7 +475,7 @@ function GetJuliaIndent()
|
||||
endif
|
||||
let ind += shiftwidth()
|
||||
|
||||
" Or did we just close a multiline import/using/export statement?
|
||||
" Or did we just close a multiline import/using/export/public statement?
|
||||
elseif !IsInContinuationImportLine(v:lnum) && IsInContinuationImportLine(lnum)
|
||||
" find the starting line of the statement
|
||||
let ilnum = 0
|
||||
|
||||
Reference in New Issue
Block a user