Improve guard to support concatenated files

This commit is contained in:
Adam Stankiewicz
2019-09-06 15:54:31 +02:00
parent c8897c9c18
commit 48e07bc501
565 changed files with 1137 additions and 2284 deletions

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
if exists('b:did_indent') | finish | endif
let b:did_indent = 1
@@ -25,3 +22,4 @@ endfunction
set indentexpr=DockerfileIndent(v:lnum)
endif

View File

@@ -1,5 +1,3 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jenkins') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
runtime indent/groovy.vim
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ansible') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
let s:save_cpo = &cpo
set cpo&vim
@@ -61,3 +58,4 @@ function GetAnsibleIndent(lnum)
endfunction
let &cpo = s:save_cpo
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'applescript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'applescript') == -1
"Plugin Name: applescript indent file.
"Author: mityu
"Last Change: 02-May-2017.
@@ -79,3 +76,4 @@ let &cpo=s:cpo_save
unlet s:cpo_save
" vim: foldmethod=marker
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'arduino') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1
" Vim indent file
" Language: Arduino
" Maintainer: Kevin Sjöberg <kev.sjoberg@gmail.com>
@@ -17,3 +14,4 @@ let b:did_indent = 1
setlocal cindent
let b:undo_indent = "setl cin<"
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'autohotkey') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autohotkey') == -1
" Vim indent file
" Language: AutoHotkey
" Maintainer: Hirotoshi Namikawa <hnamikaw1@gmail.com>
@@ -221,3 +218,4 @@ function! GetAutoHotkeyIndent()
endfunction
let b:did_indent = 1
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'blade') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1
" Vim indent file
" Language: Blade (Laravel)
" Maintainer: Jason Walton <jwalton512@gmail.com>
@@ -97,3 +94,4 @@ function! GetBladeIndent()
return indent
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'haskell') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" indentation for cabal
"
" author: raichoo (raichoo@googlemail.com)
@@ -33,3 +30,4 @@ function! GetCabalIndent()
return match(l:prevline, '\S')
endif
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'caddyfile') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1
if exists('b:did_indent')
finish
endif
@@ -43,3 +40,4 @@ function! GetCaddyfileIndent(lnum)
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'clojure') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1
" Vim indent file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
@@ -405,3 +402,4 @@ let &cpo = s:save_cpo
unlet! s:save_cpo
" vim:sts=8:sw=8:ts=8:noet
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'cmake') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1
" Vim indent file
" Language: CMake (ft=cmake)
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
@@ -91,3 +88,4 @@ endfun
let &cpo = s:keepcpo
unlet s:keepcpo
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
" Language: CoffeeScript
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
@@ -430,3 +427,4 @@ function! GetCoffeeIndent(curlnum)
" No special rules applied, so use the default policy.
exec 'return' s:GetDefaultPolicy(a:curlnum)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'crystal') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
finish
@@ -637,3 +634,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 et:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'cucumber') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1
" Vim indent file
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
@@ -77,3 +74,4 @@ function! GetCucumberIndent()
endfunction
" vim:set sts=2 sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'python-indent') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-indent') == -1
" PEP8 compatible Python indent file
" Language: Python
" Maintainer: Daniel Hahler <https://daniel.hahler.de/>
@@ -456,3 +453,4 @@ function! GetPythonPEPIndent(lnum)
return s:indent_like_previous_line(a:lnum)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dlang') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1
" Vim indent file for the D programming language (version 1.076 and 2.063).
"
" Language: D
@@ -79,3 +76,4 @@ function GetDIndent()
return cind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dart') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1
if exists('b:did_indent')
finish
endif
@@ -37,3 +34,4 @@ function! DartIndent()
return indentTo
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ocaml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
" Vim indent file
" Language: dune
@@ -12,3 +9,4 @@ let b:did_indent = 1
" dune format-dune-file uses 1 space to indent
set softtabstop=1 shiftwidth=1 expandtab
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
if exists("b:did_indent")
finish
endif
@@ -74,3 +71,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
if exists("b:did_indent")
finish
end
@@ -17,3 +14,4 @@ setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0)
function! elixir#indent(lnum)
return elixir#indent#indent(a:lnum)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elm') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elm') == -1
" indentation for Elm (http://elm-lang.org/)
" Only load this indent file when no other was loaded.
@@ -113,3 +110,4 @@ function! GetElmIndent()
return l:ind
endfunc
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'emberscript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1
" Language: ember-script
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>>
" URL: http://github.com/yalesov/vim-ember-script
@@ -16,3 +13,4 @@ endif
runtime! indent/coffee.vim
unlet! b:did_indent
let b:did_indent = 1
endif

View File

@@ -1,10 +1,8 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'emblem') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1
" Language: emblem
" Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>
" URL: http://github.com/yalesov/vim-emblem
" Version: 2.0.1
" Last Change: 2016 Jul 6
" License: ISC
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'erlang') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1
" Vim indent file
" Language: Erlang (http://www.erlang.org)
" Author: Csaba Hoch <csaba.hoch@gmail.com>
@@ -1485,3 +1482,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2 et fdm=marker
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ruby') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1
" Vim indent file
" Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
@@ -112,3 +109,4 @@ let &cpo = s:cpo_sav
unlet! s:cpo_sav
" vim:set sw=2 sts=2 ts=8 noet:
endif

View File

@@ -1,6 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'fish') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1
setlocal indentexpr=fish#Indent()
setlocal indentkeys+==end,=else,=case
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'fsharp') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
" Vim indent file
" Language: FSharp
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
@@ -251,3 +248,4 @@ function! GetFsharpIndent()
endfunction
" vim: sw=4 et sts=4
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'git') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
" Vim indent file
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
@@ -40,3 +37,4 @@ function! GetGitconfigIndent()
return -1
endif
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'glsl') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1
" Language: OpenGL Shading Language
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>
@@ -13,3 +10,4 @@ setlocal autoindent cindent
setlocal formatoptions+=roq
" vim:set sts=2 sw=2 :
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'go') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
" Copyright 2011 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
@@ -88,3 +85,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2 ts=2 et
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'go') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
if exists("b:did_indent")
finish
endif
@@ -56,3 +53,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2 ts=2 et
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
" Vim indent file
" Language: GraphQL
" Maintainer: Jon Parise <jon@indelible.org>
@@ -79,3 +76,4 @@ endfunction
let &cpoptions = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'groovy-indent') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'groovy-indent') == -1
" Vim indent file
" Language: Groovy
" Maintainer: Toby Allsopp <toby.allsopp@peace.com> (resigned)
@@ -165,3 +162,4 @@ function GetGroovyIndent()
endfunction
" vi: sw=2 et
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'haml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1
" Vim indent file
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
@@ -76,3 +73,4 @@ function! GetHamlIndent()
endfunction
" vim:set sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'handlebars') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1
" Mustache & Handlebars syntax
" Language: Mustache, Handlebars
" Maintainer: Juvenn Woo <machese@gmail.com>
@@ -127,3 +124,4 @@ function! GetHandlebarsIndent(...)
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'haskell') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
" indentation for haskell
"
" author: raichoo (raichoo@googlemail.com)
@@ -511,3 +508,4 @@ function! GetHaskellIndent()
return -1
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'hcl') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1
if exists('b:did_indent')
finish
endif
@@ -13,3 +10,4 @@ setlocal cindent
" don't de-indent comments (cindent treats them like preprocessor directives)
setlocal cinkeys-=0#
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'html5') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" Vim indent script for HTML
" Header: "{{{
" Maintainer: Bram Moolenaar
@@ -1063,3 +1060,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim: fdm=marker ts=8 sw=2 tw=78
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'idris') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
" indentation for idris (idris-lang.org)
"
" Based on haskell indentation by motemen <motemen@gmail.com>
@@ -146,3 +143,4 @@ function! GetIdrisIndent()
return match(prevline, '\S')
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'javascript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
" Vim indent file
" Language: Javascript
" Maintainer: Chris Paul ( https://github.com/bounceme )
@@ -479,3 +476,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jinja') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jinja') == -1
" Vim indent file
" Language: Jinja HTML template
" Maintainer: Evan Hammer <evan@evanhammer.com>
@@ -82,3 +79,4 @@ function! GetDjangoIndent(...)
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'json') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json') == -1
" Vim indent file
" Language: JSON
" Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
@@ -179,3 +176,4 @@ unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jst') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jst') == -1
if exists("b:did_indent")
finish
endif
@@ -77,3 +74,4 @@ endfunction
" vim:set sw=2 sts=2 ts=8 noet:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'julia') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
" Vim indent file
" Language: Julia
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
@@ -387,3 +384,4 @@ function GetJuliaIndent()
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'kotlin') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1
" Vim indent file
" Language: Kotlin
" Maintainer: Alexander Udalov
@@ -58,3 +55,4 @@ function! GetKotlinIndent()
return prev_indent
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'less') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1
" Vim indent file
" Language: LessCSS
" Maintainer: Leonard Ehrenfried <leonard.ehrenfried@web.de>
@@ -11,4 +8,4 @@ if exists("b:did_indent")
finish
endif
runtime! indent/css.vim
runtime! indent/css.vimendif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1
" LilyPond indent file
" Language: LilyPond
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
@@ -62,3 +59,4 @@ endfunction
"
"
"
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
if exists('b:did_indent')
finish
endif
@@ -24,3 +21,4 @@ function GetLitCoffeeIndent()
endif
endfunc
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'llvm') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
" Vim indent file
" Language: llvm
" Maintainer: The LLVM team, http://llvm.org/
@@ -74,3 +71,4 @@ function! GetLLVMIndent()
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'livescript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1
" Language: LiveScript
" Maintainer: George Zahariev
" URL: http://github.com/gkz/vim-ls
@@ -266,3 +263,4 @@ function! GetLiveScriptIndent(curlinenum)
return indent
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lua') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lua') == -1
" Vim indent file
" Language: Lua
" URL: https://github.com/tbastos/vim-lua
@@ -118,3 +115,4 @@ function GetLuaIndent()
return indent(prev_line) + (shiftwidth() * i)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'mako') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
" Vim indent file
" Language: Mako
" Author: Scott Torborg <storborg@mit.edu>
@@ -430,3 +427,4 @@ fun! <SID>HtmlIndentSum(lnum, style)
endfun
" vim: set ts=4 sw=4:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'markdown') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1
if exists("b:did_indent") | finish | endif
let b:did_indent = 1
@@ -77,3 +74,4 @@ function GetMarkdownIndent()
return ind
endif
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'meson') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
" Vim indent file
" Language: Meson
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
@@ -181,3 +178,4 @@ let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'moonscript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1
" Language: MoonScript
" Maintainer: leafo <leafot@gmail.com>
" Based On: CoffeeScript by Mick Koch <kchmck@gmail.com>
@@ -325,3 +322,4 @@ function! GetMoonIndent(curlinenum)
return indent
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'nginx') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
if exists("b:did_indent")
finish
endif
@@ -13,3 +10,4 @@ setlocal indentexpr=
setlocal cindent
" Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0#
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'nim') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
@@ -144,3 +141,4 @@ endfunction
" vim:sw=2
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'nix') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1
" Vim indent file
" Language: Nix
" Maintainer: Daiderd Jordan <daiderd@gmail.com>
@@ -105,3 +102,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ocaml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
" Vim indent file
" Language: OCaml
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
@@ -275,3 +272,4 @@ function! GetOCamlIndent()
endfunction
" vim:sw=2
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ocaml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
" Vim indent file
" Language: OMakefile
@@ -116,3 +113,4 @@ function GetMakeIndent()
endif
endif
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'opencl') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
@@ -12,3 +9,4 @@ if version > 600
endif
let b:did_indent = 1
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'perl') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1
" Vim indent file
" Language: Perl 5
" Maintainer: vim-perl <vim-perl@googlegroups.com>
@@ -182,3 +179,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim:ts=8:sts=4:sw=4:expandtab:ft=vim
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'pgsql') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pgsql') == -1
" Vim indent file
" Language: SQL
" Author: David Fishburn <dfishburn dot vim at gmail dot com>
@@ -391,3 +388,4 @@ endfunction
let &cpo= s:keepcpo
unlet s:keepcpo
" vim: ts=4 fdm=marker sw=4
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'plantuml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1
scriptencoding utf-8
" Vim indent file
" Language: PlantUML
@@ -87,3 +84,4 @@ function! s:getIncIndent() abort
\ '^\s*skinparam\>.*{\s*$\|' .
\ s:typeKeywordIncPattern()
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'pony') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1
" Vim indent file
" Language: Pony
" Maintainer: Jak Wings
@@ -39,3 +36,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
let b:did_indent = 1
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'protobuf') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protobuf') == -1
" Vim indent file
" Language: Protobuf
" Maintainer: Johannes Zellner <johannes@zellner.org>
@@ -19,3 +16,4 @@ setlocal expandtab
setlocal shiftwidth=2
let b:undo_indent = "setl cin<"
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'powershell') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1
" Vim indent file
" Language: Windows PowerShell
" Maintainer: Peter Provost <peter@provost.org>
@@ -22,3 +19,4 @@ inoremap <buffer> # X#
let b:undo_indent = "setl si<"
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'pug') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pug') == -1
" Vim indent file
" Language: Pug
" Maintainer: Joshua Borton
@@ -72,3 +69,4 @@ function! GetPugIndent()
endfunction
" vim:set sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
" Vim indent file
" Language: Puppet
" Maintainer: Todd Zullinger <tmz@pobox.com>
@@ -138,3 +135,4 @@ function! GetPuppetIndent(...)
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'purescript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1
" indentation for purescript
"
" Based on idris indentation
@@ -278,3 +275,4 @@ function! GetPurescriptIndent()
return match(prevline, '\S')
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'python-indent') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-indent') == -1
" PEP8 compatible Python indent file
" Language: Python
" Maintainer: Daniel Hahler <https://daniel.hahler.de/>
@@ -456,3 +453,4 @@ function! GetPythonPEPIndent(lnum)
return s:indent_like_previous_line(a:lnum)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'qml') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
" Vim indent file
" Language: QML
" Author: Robert Kieffer
@@ -61,3 +58,4 @@ function! GetJsIndent()
return ind
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'racket') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
" Language: Racket
" Maintainer: Will Langstroth <will@langstroth.com>
" URL: http://github.com/wlangstroth/vim-racket
@@ -14,3 +11,4 @@ let b:did_indent = 1
setlocal ai nosi
let b:undo_indent = "setl ai< si<"
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'reason') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1
" Vim indent file
" Language: Reason (adapted from Rust)
" Author: Chris Morgan <me@chrismorgan.info> (Modifications by Jordan W)
@@ -219,3 +216,4 @@ function GetReasonIndent(lnum)
" Fall back on cindent, which does it mostly right
return cindent(a:lnum)
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'ruby') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1
" Vim indent file
" Language: Ruby
" Maintainer: Andrew Radev <andrey.radev@gmail.com>
@@ -954,3 +951,4 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 et:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rust') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
" Vim indent file
" Language: Rust
" Author: Chris Morgan <me@chrismorgan.info>
@@ -281,3 +278,4 @@ unlet s:save_cpo
" vint: +ProhibitAbbreviationOption
" vim: set et sw=4 sts=4 ts=8:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scala') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1
" Vim indent file
" Language : Scala (http://scala-lang.org/)
" Original Author : Stefan Matthias Aust
@@ -608,3 +605,4 @@ endfunction
" vim:set sw=2 sts=2 ts=8 et:
" vim600:fdm=marker fdl=1 fdc=0:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scss') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1
" Vim indent file
" Language : SCSS (Sassy CSS)
" Maintainer : Daniel Hofstetter (daniel.hofstetter@42dh.com)
@@ -91,3 +88,4 @@ unlet s:keepcpo
" vim:set et ts=2 sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'slim') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slim') == -1
" Vim indent file
" Language: Slim
@@ -77,3 +74,4 @@ function! GetSlimIndent()
endfunction
" vim:set sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'slime') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slime') == -1
" Vim indent file
" Language: Slime
@@ -77,3 +74,4 @@ function! GetSlimeIndent()
endfunction
" vim:set sw=2:
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'solidity') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1
" Vim indent file
" Language: Solidity
" Acknowledgement: Based off of vim-javascript
@@ -441,3 +438,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'stylus') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stylus') == -1
" Vim indent file
" Language: Stylus
" Maintainer: Marc Harter
@@ -131,3 +128,4 @@ function! GetStylusIndent()
endfunction
" vim:set sw=2;
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svelte') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1
" Vim indent file
" Language: Svelte 3 (HTML/JavaScript)
" Author: Evan Lecklider <evan@lecklider.com>
@@ -146,3 +143,4 @@ function! GetSvelteIndent()
return indent
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'svg-indent') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svg-indent') == -1
" Vim indent file
"
" Language: svg
@@ -107,3 +104,4 @@ endfun
let &cpo = s:keepcpo
unlet s:keepcpo
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'swift') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1
" File: swift.vim
" Author: Keith Smiley
" Description: The indent file for Swift
@@ -296,3 +293,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'terraform') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1
" Only load this file if no other indent file was loaded
if exists('b:did_indent')
finish
@@ -56,3 +53,4 @@ endfunction
let &cpoptions = s:cpo_save
unlet s:cpo_save
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'latex') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latex') == -1
" LaTeX indent file (part of LaTeX Box)
" Maintainer: David Munger (mungerd@gmail.com)
@@ -138,3 +135,4 @@ if v:version > 703 || (v:version == 703 && has('patch598'))
endif
" vim:fdm=marker:ff=unix:noet:ts=4:sw=4
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
" Save the current JavaScript indentexpr.
let b:tsx_ts_indentexpr = &indentexpr
@@ -112,3 +109,4 @@ fu! GetTsxIndent()
return ind
endfu
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'twig') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1
if exists("b:ran_once")
finish
endif
@@ -78,3 +75,4 @@ fun! s:BuildStructures()
endfun
call s:BuildStructures()
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
" Vim indent file
" Language: TypeScript
" Acknowledgement: Based off of vim-ruby maintained by Nikolai Weibull http://vim-ruby.rubyforge.org
@@ -503,3 +500,4 @@ function! Fixedgq(lnum, count)
return 0
endfunction
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'vala') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
" Vim indent file
" Language: Vala
" Author: Adrià Arrufat <adria.arrufat@protonmail.ch>
@@ -85,3 +82,4 @@ function GetValaIndent(lnum)
" Fall back on cindent, which does it mostly right
return cindent(a:lnum)
endfunction
endif

View File

@@ -1,9 +1,7 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'vm') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vm') == -1
if exists("b:did_indent")
finish
endif
runtime! indent/html.vim
endif

View File

@@ -1,7 +1,4 @@
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'vue') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1
" Vim indent file
" Language: Vue.js
" Maintainer: Eduardo San Martin Morote
@@ -66,3 +63,4 @@ function! GetVueIndent()
return indent
endfunction
endif