mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-14 14:33:50 -05:00
Update
This commit is contained in:
@@ -2,6 +2,12 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') !=
|
||||
finish
|
||||
endif
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
|
||||
function! DockerfileReplaceInstruction(original, replacement)
|
||||
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
|
||||
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
|
||||
|
||||
9
ftplugin/docker-compose.vim
Normal file
9
ftplugin/docker-compose.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
@@ -25,6 +25,9 @@ if exists("loaded_matchit") && exists("b:match_words")
|
||||
\ . '\%({{\)\@<=/\s*\1\s*}}'
|
||||
endif
|
||||
|
||||
" Set template for comment
|
||||
setlocal commentstring={{!--\ %s\ --}}
|
||||
|
||||
if exists("g:mustache_abbreviations")
|
||||
inoremap <buffer> {{{ {{{}}}<left><left><left>
|
||||
inoremap <buffer> {{ {{}}<left><left>
|
||||
|
||||
@@ -28,7 +28,9 @@ if exists('loaded_matchit')
|
||||
\ ',\<hnote\>:\<endhnote\>' .
|
||||
\ ',\<title\>:\<endtitle\>' .
|
||||
\ ',\<\while\>:\<endwhile\>' .
|
||||
\ ',@startuml:@enduml'
|
||||
\ ',@startuml:@enduml' .
|
||||
\ ',@startwbs:@endwbs' .
|
||||
\ ',@startmindmap:@endmindmap'
|
||||
endif
|
||||
|
||||
if get(g:, 'plantuml_set_makeprg', 1)
|
||||
|
||||
@@ -39,7 +39,7 @@ if get(g:, 'rust_bang_comment_leader', 0)
|
||||
" leaders. I'm fairly sure that's a Vim bug.
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,://
|
||||
else
|
||||
setlocal comments=s0:/*!,m:\ ,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
|
||||
setlocal comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,://
|
||||
endif
|
||||
setlocal commentstring=//%s
|
||||
setlocal formatoptions-=t formatoptions+=croqnl
|
||||
@@ -195,7 +195,7 @@ augroup END
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
" For matchit.vim (rustArrow stops `Fn() -> X` messing things up)
|
||||
let b:match_skip = 's:comment\|string\|rustArrow'
|
||||
let b:match_skip = 's:comment\|string\|rustCharacter\|rustArrow'
|
||||
|
||||
" vint: -ProhibitAbbreviationOption
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
"
|
||||
" Support for Tagbar -- https://github.com/majutsushi/tagbar
|
||||
"
|
||||
if !exists(':Tagbar')
|
||||
if !exists(':Tagbar') || rust#tags#IsUCtags()
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -26,25 +26,14 @@ if !has('patch-7.4.1142')
|
||||
endif
|
||||
|
||||
if get(g:, 'terraform_fold_sections', 0)
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=terraform#folds()
|
||||
setlocal foldlevel=1
|
||||
setlocal foldtext=terraform#foldText()
|
||||
let b:undo_ftplugin .= ' foldmethod< foldexpr< foldlevel< foldtext<'
|
||||
setlocal foldmethod=syntax
|
||||
let b:undo_ftplugin .= ' foldmethod<'
|
||||
endif
|
||||
|
||||
" Set the commentstring
|
||||
let &l:commentstring = get(g:, 'terraform_commentstring', '#%s')
|
||||
setlocal commentstring=#%s
|
||||
let b:undo_ftplugin .= ' commentstring<'
|
||||
|
||||
" Re-map the space bar to fold and unfold
|
||||
if get(g:, 'terraform_remap_spacebar', 0)
|
||||
nnoremap <buffer> <space> za
|
||||
onoremap <buffer> <space> <C-C>za
|
||||
vnoremap <buffer> <space> zf
|
||||
let b:undo_ftplugin .= '|unmap <buffer> <space>'
|
||||
endif
|
||||
|
||||
if get(g:, 'terraform_align', 0) && exists(':Tabularize')
|
||||
inoremap <buffer> <silent> = =<Esc>:call terraform#align()<CR>a
|
||||
let b:undo_ftplugin .= '|iunmap <buffer> ='
|
||||
|
||||
Reference in New Issue
Block a user