mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -25,10 +25,11 @@ setlocal commentstring=#\ %s
|
||||
|
||||
let &l:path =
|
||||
\ join([
|
||||
\ 'lib',
|
||||
\ 'src',
|
||||
\ 'deps/**/lib',
|
||||
\ 'deps/**/src',
|
||||
\ 'lib/**',
|
||||
\ 'src/**',
|
||||
\ 'test/**',
|
||||
\ 'deps/**/lib/**',
|
||||
\ 'deps/**/src/**',
|
||||
\ &g:path
|
||||
\ ], ',')
|
||||
setlocal includeexpr=elixir#util#get_filename(v:fname)
|
||||
|
||||
@@ -37,7 +37,7 @@ if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
|
||||
else
|
||||
setlocal keywordprg=git\ show
|
||||
endif
|
||||
if has('gui_running')
|
||||
if has('gui_running') && &guioptions !~# '!'
|
||||
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
|
||||
endif
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ if exists("loaded_matchit")
|
||||
" the 'begin' and 'end' keywords when they are used as a range rather than as
|
||||
" the delimiter of a block
|
||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
|
||||
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bsvr]\\|ip\\|MIME\\|big\\|raw\\|test\\|html\\|int128\\|Printf\\|Shell\\|Doc\\)\\?String\\|StringPrefixed\\|RegEx\\)\\>"'
|
||||
\ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Macro\\|Dotted\\)\\>"'
|
||||
|
||||
let b:undo_ftplugin = b:undo_ftplugin
|
||||
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"
|
||||
|
||||
@@ -5,6 +5,7 @@ endif
|
||||
" Vim filetype plugin file
|
||||
" Language: meson
|
||||
" License: VIM License
|
||||
" Maintainer: Liam Beguin <liambeguin@gmail.com>
|
||||
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
" Last Change: 2018 Nov 27
|
||||
|
||||
|
||||
43
ftplugin/modula2.vim
Normal file
43
ftplugin/modula2.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula2', 'ftplugin/modula2.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-2
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
" The second branch of the middle pattern is intended to match CASE labels
|
||||
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' ..
|
||||
\ ':' ..
|
||||
\ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' ..
|
||||
\ ':' ..
|
||||
\ '\<END\>'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
42
ftplugin/modula3.vim
Normal file
42
ftplugin/modula3.vim
Normal file
@@ -0,0 +1,42 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula3', 'ftplugin/modula3.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-3
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' ..
|
||||
\ ':' ..
|
||||
\ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' ..
|
||||
\ ':' ..
|
||||
\ '\<END\>'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
@@ -3,22 +3,52 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'pascal', 'ftplugin/pascal.vim
|
||||
endif
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: pascal
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Changed: 11 Apr 2011
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
" Language: Pascal
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Change: 2021 Apr 23
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1 " (pascal is case-insensitive)
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>'
|
||||
let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>'
|
||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||
let b:match_words .= ',\<if\>:\<else\>'
|
||||
set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:}
|
||||
set commentstring={%s}
|
||||
|
||||
if exists("pascal_delphi")
|
||||
set comments+=:///
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "unlet! b:match_words"
|
||||
if !exists("pascal_traditional")
|
||||
set commentstring=//\ %s
|
||||
set comments+=://
|
||||
endif
|
||||
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1 " (Pascal is case-insensitive)
|
||||
|
||||
let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>'
|
||||
let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>'
|
||||
let b:match_words .= ':\<end\>\.\@!'
|
||||
|
||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||
" let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway.
|
||||
let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< cms< com< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words b:match_ignorecase"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: R Markdown file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Jul 22, 2018 06:51PM
|
||||
" Last Change: Sat Aug 15, 2020 12:03PM
|
||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -50,7 +50,7 @@ runtime ftplugin/pandoc.vim
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: Rnoweb
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:37PM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -28,7 +28,7 @@ setlocal iskeyword=@,48-57,_,.
|
||||
setlocal suffixesadd=.bib,.tex
|
||||
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: reStructuredText documentation format with R code
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Wed Nov 01, 2017 10:47PM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
" Original work by Alex Zvoleff
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -41,7 +41,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g
|
||||
setlocal formatexpr=FormatRrst()
|
||||
endif
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim filetype plugin file
|
||||
" Language: SystemVerilog
|
||||
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
|
||||
" Last Change: 12-Aug-2013.
|
||||
" Last Change: 07-May-2021
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -13,3 +13,36 @@ endif
|
||||
|
||||
" Behaves just like Verilog
|
||||
runtime! ftplugin/verilog.vim
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Add SystemVerilog keywords for matchit plugin.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words =
|
||||
\ '\<begin\>:\<end\>,' .
|
||||
\ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
|
||||
\ '\<module\>:\<endmodule\>,' .
|
||||
\ '\<if\>:`\@<!\<else\>,' .
|
||||
\ '\<function\>:\<endfunction\>,' .
|
||||
\ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
|
||||
\ '\<task\>:\<endtask\>,' .
|
||||
\ '\<specify\>:\<endspecify\>,' .
|
||||
\ '\<config\>:\<endconfig\>,' .
|
||||
\ '\<generate\>:\<endgenerate\>,' .
|
||||
\ '\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,' .
|
||||
\ '\<primitive\>:\<endprimitive\>,' .
|
||||
\ '\<table\>:\<endtable\>,' .
|
||||
\ '\<checker\>:\<endchecker\>,' .
|
||||
\ '\<class\>:\<endclass\>,' .
|
||||
\ '\<clocking\>:\<endclocking\>,' .
|
||||
\ '\<gruop\>:\<endgruop\>,' .
|
||||
\ '\<interface\>:\<endinterface\>,' .
|
||||
\ '\<package\>:\<endpackage\>,' .
|
||||
\ '\<program\>:\<endprogram\>,' .
|
||||
\ '\<property\>:\<endproperty\>,' .
|
||||
\ '\<sequence\>:\<endsequence\>'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -24,7 +24,7 @@ function! _VFormatFile()
|
||||
else
|
||||
let [_, lnum, colnum, _] = getpos('.')
|
||||
%delete
|
||||
call append(0, split(substitution, "\n"))
|
||||
call setline(1, split(substitution, "\n"))
|
||||
call cursor(lnum, colnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user