This commit is contained in:
Adam Stankiewicz
2021-03-01 13:44:50 +01:00
parent 4c10562d2c
commit cc63193ce8
62 changed files with 1166 additions and 1072 deletions

View File

@@ -163,40 +163,41 @@ if exists("g:ada_abbrev")
endif
" Section: Commands, Mapping, Menus {{{1
"
call ada#Map_Popup (
\ 'Tag.List',
\ 'l',
\ 'call ada#List_Tag ()')
call ada#Map_Popup (
\'Tag.Jump',
\'j',
\'call ada#Jump_Tag ()')
call ada#Map_Menu (
\'Tag.Create File',
\':AdaTagFile',
\'call ada#Create_Tags (''file'')')
call ada#Map_Menu (
\'Tag.Create Dir',
\':AdaTagDir',
\'call ada#Create_Tags (''dir'')')
if !exists(':AdaTagFile')
call ada#Map_Popup (
\ 'Tag.List',
\ 'l',
\ 'call ada#List_Tag ()')
call ada#Map_Popup (
\'Tag.Jump',
\'j',
\'call ada#Jump_Tag ()')
call ada#Map_Menu (
\'Tag.Create File',
\':AdaTagFile',
\'call ada#Create_Tags (''file'')')
call ada#Map_Menu (
\'Tag.Create Dir',
\':AdaTagDir',
\'call ada#Create_Tags (''dir'')')
call ada#Map_Menu (
\'Highlight.Toggle Space Errors',
\ ':AdaSpaces',
\'call ada#Switch_Syntax_Option (''space_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Lines Errors',
\ ':AdaLines',
\'call ada#Switch_Syntax_Option (''line_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Rainbow Color',
\ ':AdaRainbow',
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
call ada#Map_Menu (
\'Highlight.Toggle Standard Types',
\ ':AdaTypes',
\'call ada#Switch_Syntax_Option (''standard_types'')')
call ada#Map_Menu (
\'Highlight.Toggle Space Errors',
\ ':AdaSpaces',
\'call ada#Switch_Syntax_Option (''space_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Lines Errors',
\ ':AdaLines',
\'call ada#Switch_Syntax_Option (''line_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Rainbow Color',
\ ':AdaRainbow',
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
call ada#Map_Menu (
\'Highlight.Toggle Standard Types',
\ ':AdaTypes',
\'call ada#Switch_Syntax_Option (''standard_types'')')
endif
" 1}}}
" Reset cpoptions

31
ftplugin/basic.vim Normal file
View File

@@ -0,0 +1,31 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'basic', 'ftplugin/basic.vim')
finish
endif
" Vim filetype plugin file
" Language: BASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:REM,:'
setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms< sua<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -5,7 +5,7 @@ endif
" Vim filetype plugin file
" Language: Bazel (http://bazel.io)
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
" Last Change: 2015 Aug 11
" Last Change: 2021 Jan 19
""
" @section Introduction, intro
@@ -55,6 +55,8 @@ if get(g:, 'ft_bzl_fold', 0)
endif
if exists('*BzlFoldText')
let &cpo = s:save_cpo
unlet s:save_cpo
finish
endif

View File

@@ -1,4 +1,4 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'puppet', 'ftplugin/embeddedpuppet.vim')
if polyglot#init#is_disabled(expand('<sfile>:p'), 'puppet', 'ftplugin/epuppet.vim')
finish
endif

View File

@@ -7,14 +7,14 @@ endif
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-19
let s:cpo_save = &cpo
set cpo&vim
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords"
setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */

17
ftplugin/freebasic.vim Normal file
View File

@@ -0,0 +1,17 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'freebasic', 'ftplugin/freebasic.vim')
finish
endif
" Vim filetype plugin file
" Language: FreeBasic
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
runtime! ftplugin/basic.vim
" vim: ts=8

View File

@@ -6,7 +6,7 @@ endif
" Language: Hamster Script
" Version: 2.0.6.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 18
" Last Change: 2021 Jan 19
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -61,6 +61,9 @@ if exists("loaded_matchit")
endif
setlocal ignorecase
let &cpo = s:cpo_save
unlet s:cpo_save
setlocal cpo+=M " makes \%( match \)
" Disabled, 'cpo' is a global option.
" setlocal cpo+=M " makes \%( match \)

View File

@@ -18,13 +18,11 @@ endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
setl comments=:;
setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
setl define=^\\s*(def\\k*
setl formatoptions-=t
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
setl commentstring=;%s
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<"

5
ftplugin/octave.vim Normal file
View File

@@ -0,0 +1,5 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'octave', 'ftplugin/octave.vim')
finish
endif
setlocal commentstring=%\ %s

View File

@@ -51,7 +51,7 @@ setlocal smartindent nocindent
if get(g:, 'rust_recommended_style', 1)
let b:rust_set_style = 1
setlocal tabstop=8 shiftwidth=4 softtabstop=4 expandtab
setlocal shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
endif

View File

@@ -2,4 +2,14 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'sxhkd', 'ftplugin/sxhkdrc.vim
finish
endif
if exists("b:did_ftplugin")
finish
endif
setlocal cms=#%s
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setlocal commentstring<"
else
let b:undo_ftplugin = "setlocal commentstring<"
endif

36
ftplugin/tidy.vim Normal file
View File

@@ -0,0 +1,36 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'tidy', 'ftplugin/tidy.vim')
finish
endif
" Vim filetype plugin file
" Language: HMTL Tidy Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Sep 4
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#,://
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" .
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
\ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" .
\ "XML Files (*.xml)\t*.xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@@ -2,5 +2,36 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'v', 'ftplugin/vlang.vim')
finish
endif
if exists("b:did_ftplugin")
finish
endif
setlocal commentstring=//\ %s
setlocal makeprg=v\ %
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setlocal commentstring< makeprg<"
else
let b:undo_ftplugin = "setlocal commentstring< makeprg<"
endif
function! _VFormatFile()
if exists('g:v_autofmt_bufwritepre') && g:v_autofmt_bufwritepre || exists('b:v_autofmt_bufwritepre') && b:v_autofmt_bufwritepre
let substitution = system("v fmt -", join(getline(1, line('$')), "\n"))
if v:shell_error != 0
echoerr "While formatting the buffer via vfmt, the following error occurred:"
echoerr printf("ERROR(%d): %s", v:shell_error, substitution)
else
let [_, lnum, colnum, _] = getpos('.')
%delete
call append(0, split(substitution, "\n"))
call cursor(lnum, colnum)
endif
endif
endfunction
if has('autocmd')
augroup v_fmt
autocmd BufWritePre *.v call _VFormatFile()
augroup END
endif

View File

@@ -12,6 +12,11 @@ let b:did_ftplugin = 1
let s:cpo_orig = &cpo
set cpo&vim
compiler zig_build
" Match Zig builtin fns
setlocal iskeyword+=@-@
" Recomended code style, no tabs and 4-space indentation
setlocal expandtab
setlocal tabstop=8
@@ -21,7 +26,6 @@ setlocal shiftwidth=4
setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd=.zig,.zir
setlocal makeprg=zig\ build
if has('comments')
setlocal comments=:///,://!,://,:\\\\
@@ -44,7 +48,7 @@ if exists("*json_decode") && executable('zig')
endif
let b:undo_ftplugin =
\ 'setl et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
let &cpo = s:cpo_orig
unlet s:cpo_orig