mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 05:53:50 -05:00
Update
This commit is contained in:
@@ -2,8 +2,9 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'caddyfile', 'ftplugin/caddyfi
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: Caddyfile
|
||||
" Author: Josh Glendenning <josh@isobit.io>
|
||||
" Language: Caddyfile
|
||||
" Maintainer: 0az <0az@afzhou.com>
|
||||
" Original Author: Josh Glendenning <josh@isobit.io>
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -20,7 +21,7 @@ if exists('g:NERDDelimiterMap')
|
||||
endif
|
||||
elseif exists('g:NERDCustomDelimiters')
|
||||
if !has_key(g:NERDCustomDelimiters, 'caddyfile')
|
||||
let g:NERDDelimiterMap.caddyfile = s:delimiters
|
||||
let g:NERDCustomDelimiters.caddyfile = s:delimiters
|
||||
endif
|
||||
else
|
||||
let g:NERDCustomDelimiters = {'caddyfile': s:delimiters}
|
||||
|
||||
@@ -9,7 +9,8 @@ endif
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" Arvid Bjurklint (http://github.com/slarwise)
|
||||
" Last Update: 2021-Jan-08
|
||||
" Paweł Zacharek (http://github.com/subc2)
|
||||
" Last Update: 2022-Sep-28
|
||||
" License: Vim license
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
@@ -61,7 +62,7 @@ setlocal suffixesadd=.erl,.hrl
|
||||
let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")'
|
||||
let &l:define = '^\s*-\%(define\|record\|type\|opaque\)'
|
||||
|
||||
let s:erlang_fun_begin = '^\a\w*(.*$'
|
||||
let s:erlang_fun_begin = '^\l[A-Za-z0-9_@]*(.*$'
|
||||
let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$'
|
||||
|
||||
if !exists('*GetErlangFold')
|
||||
@@ -103,6 +104,23 @@ let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<"
|
||||
\ . " comments< commentstring< formatoptions< suffixesadd< include<"
|
||||
\ . " define<"
|
||||
|
||||
" The following lines enable the macros/matchit.vim plugin for
|
||||
" extended matching with the % key.
|
||||
if exists("loaded_matchit")
|
||||
let s:sw = &sw
|
||||
if exists('*shiftwidth')
|
||||
let s:sw = shiftwidth()
|
||||
endif
|
||||
|
||||
let b:match_words =
|
||||
\ '\<\%(begin\|case\|fun\|if\|maybe\|receive\|try\)\>' .
|
||||
\ ':\<\%(after\|catch\|else\|of\)\>' .
|
||||
\ ':\<end\>,' .
|
||||
\ '^\l[A-Za-z0-9_@]*' .
|
||||
\ ':^\%(\%(\t\| \{' . s:sw . '}\)\%([^\t\ %][^%]*\)\?\)\?;\s*\%(%.*\)\?$\|\.[\t\ %]\|\.$'
|
||||
let b:match_skip = 's:comment\|string\|erlangmodifier\|erlangquotedatom'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
@@ -89,8 +89,12 @@ runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Combine the new set of values with those previously included.
|
||||
if exists("b:undo_ftplugin")
|
||||
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
|
||||
if !exists('b:undo_ftplugin')
|
||||
" No-op
|
||||
let b:undo_ftplugin = 'exe'
|
||||
endif
|
||||
if !empty(s:undo_ftplugin)
|
||||
let b:undo_ftplugin .= '|' . s:undo_ftplugin
|
||||
endif
|
||||
if exists ("b:browsefilter")
|
||||
let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
|
||||
@@ -122,7 +126,7 @@ endif
|
||||
setlocal commentstring=<%#%s%>
|
||||
|
||||
let b:undo_ftplugin = "setl cms< " .
|
||||
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
|
||||
\ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim filetype plugin
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2019 Dec 05
|
||||
" Last Change: 2022 Jan 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
@@ -16,7 +16,7 @@ let b:did_ftplugin = 1
|
||||
|
||||
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
|
||||
setlocal formatlistpat+=\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
setlocal include=^+++
|
||||
setlocal includeexpr=substitute(v:fname,'^[bi]/','','')
|
||||
|
||||
@@ -46,6 +46,11 @@ function! s:diffcomplete(A, L, P) abort
|
||||
return args
|
||||
endfunction
|
||||
|
||||
function! s:setupdiff() abort
|
||||
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0, <f-args>)
|
||||
setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
|
||||
endfunction
|
||||
|
||||
function! s:gitdiffcached(bang, ...) abort
|
||||
let name = tempname()
|
||||
if a:0
|
||||
@@ -54,8 +59,6 @@ function! s:gitdiffcached(bang, ...) abort
|
||||
let extra = "-p --stat=".&columns
|
||||
endif
|
||||
call system("git diff --cached --no-color --no-ext-diff ".extra." > ".shellescape(name))
|
||||
exe "pedit " . fnameescape(name)
|
||||
wincmd P
|
||||
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0, <f-args>)
|
||||
setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
|
||||
exe 'pedit +call\ s:setupdiff()' fnameescape(name)
|
||||
silent! wincmd P
|
||||
endfunction
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim filetype plugin
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2019 Dec 05
|
||||
" Last Change: 2022 Jan 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim filetype plugin
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@@ -26,10 +26,16 @@ setlocal fo-=t fo+=croql
|
||||
let b:julia_vim_loaded = 1
|
||||
|
||||
let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<"
|
||||
\ . " expandtab< shiftwidth<"
|
||||
\ . " define< fo< indentexpr< indentkeys< cinoptions< completefunc<"
|
||||
\ . " | unlet! b:commentary_format"
|
||||
\ . " | unlet! b:smartcomment_force_linemode"
|
||||
\ . " | unlet! b:julia_vim_loaded"
|
||||
|
||||
if !exists("g:julia_set_indentation") || g:julia_set_indentation != 0
|
||||
" As suggested by Style Guide.
|
||||
setlocal expandtab shiftwidth=4
|
||||
endif
|
||||
|
||||
" MatchIt plugin support
|
||||
if exists("loaded_matchit")
|
||||
|
||||
@@ -860,7 +860,11 @@ endfunction
|
||||
|
||||
|
||||
function! s:MarkdownRefreshSyntax(force)
|
||||
if &filetype =~# 'markdown' && line('$') > 1
|
||||
" Use != to compare &syntax's value to use the same logic run on
|
||||
" $VIMRUNTIME/syntax/synload.vim.
|
||||
"
|
||||
" vint: next-line -ProhibitEqualTildeOperator
|
||||
if &filetype =~# 'markdown' && line('$') > 1 && &syntax != 'OFF'
|
||||
call s:MarkdownHighlightSources(a:force)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
17
ftplugin/mir.vim
Normal file
17
ftplugin/mir.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'llvm', 'ftplugin/mir.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: LLVM Machine IR
|
||||
" Maintainer: The LLVM team, http://llvm.org/
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal softtabstop=2 shiftwidth=2
|
||||
setlocal expandtab
|
||||
setlocal comments+=:;
|
||||
|
||||
@@ -17,7 +17,7 @@ let b:did_ftplugin = 1
|
||||
|
||||
setlocal tw=0
|
||||
setlocal commentstring=#%s
|
||||
setlocal formatoptions=tcqro
|
||||
setlocal formatoptions+=tcqroj
|
||||
" Enable autocompletion of hyphenated PowerShell commands,
|
||||
" e.g. Get-Content or Get-ADUser
|
||||
setlocal iskeyword+=-
|
||||
|
||||
46
ftplugin/requirements.vim
Normal file
46
ftplugin/requirements.vim
Normal file
@@ -0,0 +1,46 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'ftplugin/requirements.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" the Requirements File Format syntax support for Vim
|
||||
" Version: 1.7.1
|
||||
" Author: raimon <raimon49@hotmail.com>
|
||||
" License: MIT LICENSE
|
||||
" The MIT License (MIT)
|
||||
"
|
||||
" Copyright (c) 2015 raimon
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
" in the Software without restriction, including without limitation the rights
|
||||
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
" copies of the Software, and to permit persons to whom the Software is
|
||||
" furnished to do so, subject to the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included in all
|
||||
" copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
" SOFTWARE.
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:save_cpoptions = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
let b:undo_ftplugin = "setl iskeyword< commentstring<"
|
||||
" pip options contain "-"
|
||||
setlocal iskeyword+=-
|
||||
setlocal commentstring=#\ %s
|
||||
compiler pip_compile
|
||||
|
||||
let &cpoptions = s:save_cpoptions
|
||||
unlet s:save_cpoptions
|
||||
" vim: et sw=4 ts=4 sts=4:
|
||||
@@ -54,6 +54,13 @@ endif
|
||||
let b:undo_ftplugin =
|
||||
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
|
||||
|
||||
augroup vim-zig
|
||||
autocmd! * <buffer>
|
||||
autocmd BufWritePre <buffer> if get(g:, 'zig_fmt_autosave', 1) | call zig#fmt#Format() | endif
|
||||
augroup END
|
||||
|
||||
let b:undo_ftplugin .= '|au! vim-zig * <buffer>'
|
||||
|
||||
let &cpo = s:cpo_orig
|
||||
unlet s:cpo_orig
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
|
||||
Reference in New Issue
Block a user