mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-14 14:33:50 -05:00
Update (periodic rebuild)
I originally meant to run this before adding haproxy, but accidentally
pushed that into my branch. If you'd like to see that content, it's at
414ad25c3a.
This commit is contained in:
@@ -33,6 +33,12 @@ function! GetNixIndent()
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Skip indentation for single line comments explicitly, in case a
|
||||
" comment was just inserted (eg. visual block mode)
|
||||
if getline(v:lnum) =~ '^\s*#'
|
||||
return indent(v:lnum)
|
||||
endif
|
||||
|
||||
if synIDattr(synID(v:lnum, 1, 1), "name") !~ s:skip_syntax
|
||||
let current_line = getline(v:lnum)
|
||||
let last_line = getline(lnum)
|
||||
@@ -63,7 +69,7 @@ function! GetNixIndent()
|
||||
|
||||
let ind = indent(v:lnum)
|
||||
let bslnum = searchpair('''''', '', '''''', 'bnW',
|
||||
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "InterpolationSpecial$"')
|
||||
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "StringSpecial$"')
|
||||
|
||||
if ind <= indent(bslnum)
|
||||
let ind = indent(bslnum) + &sw
|
||||
|
||||
Reference in New Issue
Block a user