summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
commita4e9136f68a40b1cb0eb6df5a5f06603224a87f4 (patch)
treeba32e0d0069ad6adfd6b32d05161a03eea5e4c7c /runtime/ftplugin
parentReleasing progress-linux version 2:9.1.0496-1~progress7.99u1. (diff)
downloadvim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.tar.xz
vim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.zip
Merging upstream version 2:9.1.0698.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/antlr4.vim14
-rw-r--r--runtime/ftplugin/asy.vim14
-rw-r--r--runtime/ftplugin/autohotkey.vim16
-rw-r--r--runtime/ftplugin/bindzone.vim16
-rw-r--r--runtime/ftplugin/cabal.vim13
-rw-r--r--runtime/ftplugin/cedar.vim13
-rw-r--r--runtime/ftplugin/chicken.vim16
-rw-r--r--runtime/ftplugin/cmakecache.vim13
-rw-r--r--runtime/ftplugin/csv.vim23
-rw-r--r--runtime/ftplugin/cuda.vim11
-rw-r--r--runtime/ftplugin/editorconfig.vim13
-rw-r--r--runtime/ftplugin/gdscript.vim6
-rw-r--r--runtime/ftplugin/go.vim6
-rw-r--r--runtime/ftplugin/goaccess.vim14
-rw-r--r--runtime/ftplugin/gomod.vim16
-rw-r--r--runtime/ftplugin/hlsplaylist.vim37
-rw-r--r--runtime/ftplugin/htmlangular.vim12
-rw-r--r--runtime/ftplugin/javacc.vim20
-rw-r--r--runtime/ftplugin/kivy.vim13
-rw-r--r--runtime/ftplugin/ldapconf.vim13
-rw-r--r--runtime/ftplugin/lex.vim14
-rw-r--r--runtime/ftplugin/man.vim14
-rw-r--r--runtime/ftplugin/mediawiki.vim42
-rw-r--r--runtime/ftplugin/mermaid.vim5
-rw-r--r--runtime/ftplugin/mojo.vim41
-rw-r--r--runtime/ftplugin/mysql.vim9
-rw-r--r--runtime/ftplugin/objcpp.vim1
-rw-r--r--runtime/ftplugin/scheme.vim18
-rw-r--r--runtime/ftplugin/sql.vim26
-rw-r--r--runtime/ftplugin/squirrel.vim17
-rw-r--r--runtime/ftplugin/terraform.vim14
-rw-r--r--runtime/ftplugin/tf.vim13
-rw-r--r--runtime/ftplugin/thrift.vim17
-rw-r--r--runtime/ftplugin/typst.vim22
-rw-r--r--runtime/ftplugin/yacc.vim16
35 files changed, 521 insertions, 47 deletions
diff --git a/runtime/ftplugin/antlr4.vim b/runtime/ftplugin/antlr4.vim
new file mode 100644
index 0000000..610d528
--- /dev/null
+++ b/runtime/ftplugin/antlr4.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: ANTLR4, ANother Tool for Language Recognition v4 <www.antlr.org>
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Last Change: 2024 July 09
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/asy.vim b/runtime/ftplugin/asy.vim
new file mode 100644
index 0000000..76bd69d
--- /dev/null
+++ b/runtime/ftplugin/asy.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: Asymptote
+" Maintainer: AvidSeeker <avidseeker7@protonmail.com>
+" Last Change: 2024 Jul 13
+"
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let g:did_ftplugin = 1
+
+setlocal commentstring=/*\ %s\ */
+
+let b:undo_ftplugin = "setl commentstring<"
diff --git a/runtime/ftplugin/autohotkey.vim b/runtime/ftplugin/autohotkey.vim
new file mode 100644
index 0000000..9cb4fd7
--- /dev/null
+++ b/runtime/ftplugin/autohotkey.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language: AutoHotkey
+" Maintainer: Peter Aronoff <peteraronoff@fastmail.com>
+" Last Changed: 2024 Jul 25
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=:;
+setlocal commentstring=;\ %s
+
+let b:undo_ftplugin = "setlocal comments< commentstring<"
+
+" vim: nowrap sw=2 sts=2 ts=8 noet:
diff --git a/runtime/ftplugin/bindzone.vim b/runtime/ftplugin/bindzone.vim
new file mode 100644
index 0000000..f9e5f4b
--- /dev/null
+++ b/runtime/ftplugin/bindzone.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language: bind zone file
+" Maintainer: This runtime file is looking for a new maintainer.
+" Last Change: 2024 Jul 06
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin=1
+
+setlocal comments=b:;
+setlocal commentstring=;\ %s
+setlocal formatoptions-=t
+setlocal formatoptions+=crq
+
+let b:undo_ftplugin = "setlocal com< cms< fo<"
diff --git a/runtime/ftplugin/cabal.vim b/runtime/ftplugin/cabal.vim
new file mode 100644
index 0000000..5ccfa1d
--- /dev/null
+++ b/runtime/ftplugin/cabal.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin file
+" Language: Haskell Cabal Build file
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:-- commentstring=--\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/cedar.vim b/runtime/ftplugin/cedar.vim
new file mode 100644
index 0000000..74a1903
--- /dev/null
+++ b/runtime/ftplugin/cedar.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: Cedar
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 4
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/chicken.vim b/runtime/ftplugin/chicken.vim
index 84d45ba..b12b264 100644
--- a/runtime/ftplugin/chicken.vim
+++ b/runtime/ftplugin/chicken.vim
@@ -1,12 +1,12 @@
" CHICKEN-specific Vim customizations
-" Last Change: 2018-03-05
-" Author: Evan Hanson <evhan@foldling.org>
-" Maintainer: Evan Hanson <evhan@foldling.org>
-" Repository: https://git.foldling.org/vim-scheme.git
-" URL: https://foldling.org/vim/ftplugin/chicken.vim
-" Notes: These are supplemental settings, to be loaded after the core
-" Scheme ftplugin file (ftplugin/scheme.vim). Enable it by setting
-" b:is_chicken=1 and filetype=scheme.
+" Last Change: 2024 Jun 21
+" Author: Evan Hanson <evhan@foldling.org>
+" Maintainer: Evan Hanson <evhan@foldling.org>
+" Repository: https://git.foldling.org/vim-scheme.git
+" URL: https://foldling.org/vim/ftplugin/chicken.vim
+" Notes: These are supplemental settings, to be loaded after the
+" core Scheme ftplugin file (ftplugin/scheme.vim). Enable
+" it by setting b:is_chicken=1 and filetype=scheme.
if !exists('b:did_scheme_ftplugin')
finish
diff --git a/runtime/ftplugin/cmakecache.vim b/runtime/ftplugin/cmakecache.vim
new file mode 100644
index 0000000..6753cd2
--- /dev/null
+++ b/runtime/ftplugin/cmakecache.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: cmakecache - CMakeCache.txt files generated by CMake
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:#,:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/csv.vim b/runtime/ftplugin/csv.vim
new file mode 100644
index 0000000..f1021f8
--- /dev/null
+++ b/runtime/ftplugin/csv.vim
@@ -0,0 +1,23 @@
+vim9script
+
+# Maintainer: Maxim Kim <habamax@gmail.com>
+# Last Update: 2024-06-18
+
+if !exists("b:csv_delimiter")
+ # detect delimiter
+ var delimiters = ",;\t|"
+
+ var max = 0
+ for d in delimiters
+ var count = getline(1)->split(d)->len() + getline(2)->split(d)->len()
+ if count > max
+ max = count
+ b:csv_delimiter = d
+ endif
+ endfor
+endif
+
+if exists("b:did_ftplugin")
+ finish
+endif
+b:did_ftplugin = 1
diff --git a/runtime/ftplugin/cuda.vim b/runtime/ftplugin/cuda.vim
new file mode 100644
index 0000000..91d722b
--- /dev/null
+++ b/runtime/ftplugin/cuda.vim
@@ -0,0 +1,11 @@
+" Vim filetype plugin
+" Language: CUDA
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 29
+
+if exists('b:did_ftplugin')
+ finish
+endif
+
+" Behaves mostly just like C++
+runtime! ftplugin/cpp.vim
diff --git a/runtime/ftplugin/editorconfig.vim b/runtime/ftplugin/editorconfig.vim
new file mode 100644
index 0000000..6d43735
--- /dev/null
+++ b/runtime/ftplugin/editorconfig.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: EditorConfig
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:#,:; commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/gdscript.vim b/runtime/ftplugin/gdscript.vim
index 93519d8..d1f41c8 100644
--- a/runtime/ftplugin/gdscript.vim
+++ b/runtime/ftplugin/gdscript.vim
@@ -4,6 +4,7 @@ vim9script
# Language: gdscript (Godot game engine scripting language)
# Maintainer: Maxim Kim <habamax@gmail.com>
# Website: https://github.com/habamax/vim-gdscript
+# Last Change: 2024 Jul 14
if exists("b:did_ftplugin") | finish | endif
@@ -22,6 +23,11 @@ setlocal commentstring=#\ %s
setlocal foldignore=
setlocal foldexpr=GDScriptFoldLevel()
+if get(g:, 'gdscript_recommended_style', 1)
+ setlocal noexpandtab tabstop=4 softtabstop=0 shiftwidth=0
+ b:undo_ftplugin ..= ' | setlocal expandtab< tabstop< softtabstop< shiftwidth<'
+endif
+
def GDScriptFoldLevel(): string
var line = getline(v:lnum)
diff --git a/runtime/ftplugin/go.vim b/runtime/ftplugin/go.vim
index 61dc1a1..75f78cf 100644
--- a/runtime/ftplugin/go.vim
+++ b/runtime/ftplugin/go.vim
@@ -2,6 +2,7 @@
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
+" 2024 Jul 16 by Vim Project (add recommended indent style)
if exists('b:did_ftplugin')
finish
@@ -15,4 +16,9 @@ setlocal commentstring=//\ %s
let b:undo_ftplugin = 'setl fo< com< cms<'
+if get(g:, 'go_recommended_style', 1)
+ setlocal noexpandtab softtabstop=0 shiftwidth=0
+ let b:undo_ftplugin ..= ' | setl et< sts< sw<'
+endif
+
" vim: sw=2 sts=2 et
diff --git a/runtime/ftplugin/goaccess.vim b/runtime/ftplugin/goaccess.vim
new file mode 100644
index 0000000..fb55730
--- /dev/null
+++ b/runtime/ftplugin/goaccess.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: GoAccess configuration
+" Maintainer: Adam Monsen <haircut@gmail.com>
+" Last Change: 2024 Aug 1
+
+if exists('b:did_ftplugin')
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/gomod.vim b/runtime/ftplugin/gomod.vim
new file mode 100644
index 0000000..554c948
--- /dev/null
+++ b/runtime/ftplugin/gomod.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language: go module file
+" Maintainer: YU YUK KUEN <yukkuen.yu719@gmail.com>
+" Last Change: 2024-06-21
+" 2024 Jul 16 by Vim Project (noexpandtab)
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal noexpandtab
+setlocal formatoptions-=t formatoptions-=c
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl et< fo< cms<'
diff --git a/runtime/ftplugin/hlsplaylist.vim b/runtime/ftplugin/hlsplaylist.vim
new file mode 100644
index 0000000..879a04f
--- /dev/null
+++ b/runtime/ftplugin/hlsplaylist.vim
@@ -0,0 +1,37 @@
+" Vim filetype plugin
+" Language: HLS/M3U Playlist
+" Maintainer: AvidSeeker <avidseeker7@protonmail.com>
+" Last Change: 2024 Jul 07
+"
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let g:did_ftplugin = 1
+
+setlocal commentstring=#%s
+
+let b:undo_ftplugin = "setl commentstring<"
+
+function! M3UFold() abort
+ let line = getline(v:lnum)
+ if line =~# '^#EXTGRP'
+ return ">1"
+ endif
+ return "="
+endfunction
+
+function! M3UFoldText() abort
+ let start_line = getline(v:foldstart)
+ let title = substitute(start_line, '^#EXTGRP:*', '', '')
+ let foldsize = (v:foldend - v:foldstart + 1)
+ let linecount = '['.foldsize.' lines]'
+ return title.' '.linecount
+endfunction
+
+if has("folding")
+ setlocal foldexpr=M3UFold()
+ setlocal foldmethod=expr
+ setlocal foldtext=M3UFoldText()
+ let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
+endif
diff --git a/runtime/ftplugin/htmlangular.vim b/runtime/ftplugin/htmlangular.vim
new file mode 100644
index 0000000..b114372
--- /dev/null
+++ b/runtime/ftplugin/htmlangular.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin file
+" Language: Angular HTML Template
+" Maintainer: Dennis van den Berg <dennis@vdberg.dev>
+" Last Change: 2024 Jul 9
+
+" Only use this filetype plugin when no other was loaded.
+if exists("b:did_ftplugin")
+ finish
+endif
+
+" source the HTML ftplugin
+runtime! ftplugin/html.vim
diff --git a/runtime/ftplugin/javacc.vim b/runtime/ftplugin/javacc.vim
new file mode 100644
index 0000000..780c68b
--- /dev/null
+++ b/runtime/ftplugin/javacc.vim
@@ -0,0 +1,20 @@
+" Vim filetype plugin
+" Language: JavaCC
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'formatoptions' to break comment lines but not other lines,
+" and insert the comment leader when hitting <CR> or using "o".
+setlocal formatoptions-=t formatoptions+=croql
+
+" Set 'comments' to format dashed lists in comments. Behaves just like C.
+setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/
+
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl fo< com< cms<'
diff --git a/runtime/ftplugin/kivy.vim b/runtime/ftplugin/kivy.vim
new file mode 100644
index 0000000..e19d832
--- /dev/null
+++ b/runtime/ftplugin/kivy.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: Kivy
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl cms<'
diff --git a/runtime/ftplugin/ldapconf.vim b/runtime/ftplugin/ldapconf.vim
new file mode 100644
index 0000000..7055716
--- /dev/null
+++ b/runtime/ftplugin/ldapconf.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: ldap.conf(5) configuration file.
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:# commentstring=#\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/lex.vim b/runtime/ftplugin/lex.vim
new file mode 100644
index 0000000..c6c47fe
--- /dev/null
+++ b/runtime/ftplugin/lex.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: Lex and Flex
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 91e8a8b..45c2bb2 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -4,6 +4,8 @@
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
" Last Change: 2024 Jun 06 (disabled the q mapping, #8210)
+" 2024 Jul 06 (use nnoremap, #15130)
+" 2024 Aug 23 (improve the <Plug>ManBS mapping, #15547, #15556)
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -35,20 +37,18 @@ if &filetype == "man"
let b:undo_ftplugin = b:undo_ftplugin
\ . '|silent! nunmap <buffer> <LocalLeader>h'
endif
- nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>''
+
+ nnoremap <buffer> <silent> <Plug>ManBS :setl ma<Bar>%s/.\b//g
+ \ <Bar>setl noma<CR>`'
nnoremap <buffer> <silent> <c-]> :call dist#man#PreGetPage(v:count)<CR>
nnoremap <buffer> <silent> <c-t> :call dist#man#PopPage()<CR>
- " Disabled, since this hides the ability to record a macro or use the
- " command line window
- " nnoremap <buffer> <silent> q :q<CR>
" Add undo commands for the maps
let b:undo_ftplugin = b:undo_ftplugin
\ . '|silent! nunmap <buffer> <Plug>ManBS'
\ . '|silent! nunmap <buffer> <c-]>'
\ . '|silent! nunmap <buffer> <c-t>'
- "\ . '|silent! nunmap <buffer> q'
endif
if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
@@ -61,8 +61,8 @@ endif
if exists(":Man") != 2
com -nargs=+ -complete=shellcmd Man call dist#man#GetPage(<q-mods>, <f-args>)
- nmap <Leader>K :call dist#man#PreGetPage(0)<CR>
- nmap <Plug>ManPreGetPage :call dist#man#PreGetPage(0)<CR>
+ nnoremap <Leader>K :call dist#man#PreGetPage(0)<CR>
+ nnoremap <Plug>ManPreGetPage :call dist#man#PreGetPage(0)<CR>
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/mediawiki.vim b/runtime/ftplugin/mediawiki.vim
new file mode 100644
index 0000000..4618246
--- /dev/null
+++ b/runtime/ftplugin/mediawiki.vim
@@ -0,0 +1,42 @@
+" Language: MediaWiki
+" Maintainer: Avid Seeker <avidseeker7@protonmail.com>
+" Home: http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim
+" Last Change: 2024 Jul 14
+" Credits: chikamichi
+"
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Many MediaWiki wikis prefer line breaks only at the end of paragraphs
+" (like in a text processor), which results in long, wrapping lines.
+setlocal wrap linebreak
+setlocal textwidth=0
+
+setlocal formatoptions-=tc formatoptions+=l formatoptions+=roq
+setlocal matchpairs+=<:>
+
+" Treat lists, indented text and tables as comment lines and continue with the
+" same formatting in the next line (i.e. insert the comment leader) when hitting
+" <CR> or using "o".
+setlocal comments=n:#,n:*,n:\:,s:{\|,m:\|,ex:\|},s:<!--,m:\ \ \ \ ,e:-->
+setlocal commentstring=<!--\ %s\ -->
+
+" match HTML tags (taken directly from $VIM/ftplugin/html.vim)
+if exists("loaded_matchit")
+ let b:match_ignorecase=0
+ let b:match_skip = 's:Comment'
+ let b:match_words = '<:>,' .
+ \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
+ \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
+ \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
+endif
+
+" Enable folding based on ==sections==
+setlocal foldexpr=getline(v:lnum)=~'^\\(=\\+\\)[^=]\\+\\1\\(\\s*<!--.*-->\\)\\=\\s*$'?\">\".(len(matchstr(getline(v:lnum),'^=\\+'))-1):\"=\"
+setlocal foldmethod=expr
+
+let b:undo_ftplugin = "setl commentstring< comments< formatoptions< foldexpr< foldmethod<"
+let b:undo_ftplugin += " matchpairs< linebreak< wrap< textwidth<"
diff --git a/runtime/ftplugin/mermaid.vim b/runtime/ftplugin/mermaid.vim
index fe84ab3..5547ad3 100644
--- a/runtime/ftplugin/mermaid.vim
+++ b/runtime/ftplugin/mermaid.vim
@@ -2,6 +2,7 @@
" Language: Mermaid
" Maintainer: Craig MacEachern <https://github.com/craigmac/vim-mermaid>
" Last Change: 2022 Oct 13
+" 2024 Jul 18 by Vim Project (adjust comments)
if exists("b:did_ftplugin")
finish
@@ -16,9 +17,9 @@ setlocal shiftwidth=2
setlocal softtabstop=-1
setlocal tabstop=4
+setlocal comments=:%%
+setlocal commentstring=%%\ %s
" TODO: comments, formatlist stuff, based on what?
-setlocal comments=b:#,fb:-
-setlocal commentstring=#\ %s
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
diff --git a/runtime/ftplugin/mojo.vim b/runtime/ftplugin/mojo.vim
new file mode 100644
index 0000000..ff50229
--- /dev/null
+++ b/runtime/ftplugin/mojo.vim
@@ -0,0 +1,41 @@
+" Vim filetype plugin
+" Language: Mojo
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 07
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal include=^\\s*\\(from\\\|import\\)
+setlocal define=^\\s*\\(\\(async\\s\\+\\)\\?def\\\|class\\)
+
+" For imports with leading .., append / and replace additional .s with ../
+let b:grandparent_match = '^\(.\.\)\(\.*\)'
+let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))'
+
+" For imports with a single leading ., replace it with ./
+let b:parent_match = '^\.\(\.\)\@!'
+let b:parent_sub = './'
+
+" Replace any . sandwiched between word characters with /
+let b:child_match = '\(\w\)\.\(\w\)'
+let b:child_sub = '\1/\2'
+
+setlocal includeexpr=substitute(substitute(substitute(
+ \v:fname,
+ \b:grandparent_match,b:grandparent_sub,''),
+ \b:parent_match,b:parent_sub,''),
+ \b:child_match,b:child_sub,'g')
+
+setlocal suffixesadd=.mojo
+setlocal comments=b:#,fb:-
+setlocal commentstring=#\ %s
+
+let b:undo_ftplugin = 'setlocal include<'
+ \ . '|setlocal define<'
+ \ . '|setlocal includeexpr<'
+ \ . '|setlocal suffixesadd<'
+ \ . '|setlocal comments<'
+ \ . '|setlocal commentstring<'
diff --git a/runtime/ftplugin/mysql.vim b/runtime/ftplugin/mysql.vim
new file mode 100644
index 0000000..232df8c
--- /dev/null
+++ b/runtime/ftplugin/mysql.vim
@@ -0,0 +1,9 @@
+" Vim filetype plugin
+" Language: MySQL
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Aug 12
+if exists("b:did_ftplugin")
+ finish
+endif
+
+runtime ftplugin/sql.vim
diff --git a/runtime/ftplugin/objcpp.vim b/runtime/ftplugin/objcpp.vim
new file mode 100644
index 0000000..ffba685
--- /dev/null
+++ b/runtime/ftplugin/objcpp.vim
@@ -0,0 +1 @@
+runtime! ftplugin/objc.vim
diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim
index 03f625b..63e5781 100644
--- a/runtime/ftplugin/scheme.vim
+++ b/runtime/ftplugin/scheme.vim
@@ -1,12 +1,12 @@
" Vim filetype plugin file
-" Language: Scheme (R7RS)
-" Last Change: 2019 Nov 19
-" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
-" Author: Evan Hanson <evhan@foldling.org>
-" Maintainer: Evan Hanson <evhan@foldling.org>
+" Language: Scheme (R7RS)
+" Last Change: 2024 Jun 21
+" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
+" Author: Evan Hanson <evhan@foldling.org>
+" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
-" Repository: https://git.foldling.org/vim-scheme.git
-" URL: https://foldling.org/vim/ftplugin/scheme.vim
+" Repository: https://git.foldling.org/vim-scheme.git
+" URL: https://foldling.org/vim/ftplugin/scheme.vim
if exists('b:did_ftplugin')
finish
@@ -20,11 +20,13 @@ setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
setl commentstring=;\ %s
setl define=^\\s*(def\\k*
setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126
+setl formatoptions-=t
-let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<'
+let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword< formatoptions<'
setl lispwords+=case
setl lispwords+=define
+setl lispwords+=define-library
setl lispwords+=define-record-type
setl lispwords+=define-syntax
setl lispwords+=define-values
diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim
index 61b7e67..3b56acd 100644
--- a/runtime/ftplugin/sql.vim
+++ b/runtime/ftplugin/sql.vim
@@ -3,8 +3,9 @@
" Version: 12.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 07
-" 2024 Jan 14 by Vim Project (browsefilter)
-" 2024 May 18 by Vim Project (set comment options)
+" 2024 Jan 14 by Vim Project: browsefilter
+" 2024 May 18 by Vim Project: set comment options
+" 2024 Aug 14 by Vim Project: remove redundant code
" Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use:
@@ -92,13 +93,19 @@
" Only do this when not done yet for this buffer
" This ftplugin can be used with other ftplugins. So ensure loading
" happens if all elements of this plugin have not yet loaded.
-if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
+if exists("b:did_ftplugin")
finish
endif
+" Don't load another plugin for this buffer
+let b:did_ftplugin = 1
+
let s:save_cpo = &cpo
set cpo&vim
+let b:undo_ftplugin = "setl comments< commentstring< formatoptions< define< omnifunc<" .
+ \ " | unlet! b:browsefilter b:match_words"
+
" Disable autowrapping for code, but enable for comments
" t Auto-wrap text using textwidth
" c Auto-wrap comments using textwidth, inserting the current comment
@@ -263,19 +270,6 @@ elseif exists("g:sql_type_default")
endif
endif
-" If the above runtime command succeeded, do not load the default settings
-" as they should have already been loaded from a previous run.
-if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
- finish
-endif
-
-let b:undo_ftplugin = "setl comments< commentstring< formatoptions< define< omnifunc<" .
- \ " | unlet! b:browsefilter b:match_words"
-
-" Don't load another plugin for this buffer
-let b:did_ftplugin = 1
-let b:current_ftplugin = 'sql'
-
" Win32 and GTK can filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "SQL Files (*.sql)\t*.sql\n"
diff --git a/runtime/ftplugin/squirrel.vim b/runtime/ftplugin/squirrel.vim
new file mode 100644
index 0000000..559be88
--- /dev/null
+++ b/runtime/ftplugin/squirrel.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin
+" Language: Squirrel
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/terraform.vim b/runtime/ftplugin/terraform.vim
new file mode 100644
index 0000000..b03cab3
--- /dev/null
+++ b/runtime/ftplugin/terraform.vim
@@ -0,0 +1,14 @@
+" Vim filetype plugin
+" Language: terraform
+" Maintainer: Janno Tjarks (janno.tjarks@mailbox.org)
+" Last Change: 2024 Jul 3
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setlocal commentstring=#\ %s
+setlocal comments=://,:#
+
+let b:undo_ftplugin = "setlocal commentstring< comments<"
diff --git a/runtime/ftplugin/tf.vim b/runtime/ftplugin/tf.vim
new file mode 100644
index 0000000..1571d5e
--- /dev/null
+++ b/runtime/ftplugin/tf.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: tf (TinyFugue)
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:#,:; commentstring=;\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/runtime/ftplugin/thrift.vim b/runtime/ftplugin/thrift.vim
new file mode 100644
index 0000000..dd18e19
--- /dev/null
+++ b/runtime/ftplugin/thrift.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin file
+" Language: Apache Thrift
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Last Change: 2024/07/29
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+" Thrift supports shell-style, C-style multi-line as well as single-line Java/C++ style comments.
+" Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://,b:#
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl comments< commentstring<'
diff --git a/runtime/ftplugin/typst.vim b/runtime/ftplugin/typst.vim
index c2d7811..fba8083 100644
--- a/runtime/ftplugin/typst.vim
+++ b/runtime/ftplugin/typst.vim
@@ -1,14 +1,24 @@
-" Vim filetype plugin
-" Language: typst
-" Maintainer: Riley Bruins <ribru17@gmail.com>
-" Last Change: 2024 May 19
+" Vim filetype plugin file
+" Language: Typst
+" Maintainer: Gregory Anders
+" Last Change: 2024-07-14
+" Based on: https://github.com/kaarmu/typst.vim
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
-setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+compiler typst
+
setlocal commentstring=//\ %s
+setlocal comments=s1:/*,mb:*,ex:*/,://
+setlocal formatoptions+=croq
+setlocal suffixesadd=.typ
+
+let b:undo_ftplugin = 'setl cms< com< fo< sua<'
-let b:undo_ftplugin = 'setl com< cms<'
+if get(g:, 'typst_conceal', 0)
+ setlocal conceallevel=2
+ let b:undo_ftplugin .= ' cole<'
+endif
diff --git a/runtime/ftplugin/yacc.vim b/runtime/ftplugin/yacc.vim
new file mode 100644
index 0000000..d95e1ee
--- /dev/null
+++ b/runtime/ftplugin/yacc.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin
+" Language: Yacc
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2024 Jul 06
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+" Set 'comments' to format dashed lists in comments.
+" Also include ///, used for Doxygen.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'