mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 17:02:59 +00:00
Problem:
Vimscript ftplugins that inherit a base ftplugin often use explicit
`runtime! ftplugin/foo.vim` patterns. This skips corresponding Lua
ftplugins, unlike top-level ftplugin loading.
Solution:
Use the existing `{vim,lua}` patterns for bang runtime imports while
preserving each call's current lookup breadth.
21 lines
524 B
VimL
21 lines
524 B
VimL
" Vim filetype plugin file
|
|
" Language: bash
|
|
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
|
" Last Changed: 2023 Aug 13
|
|
"
|
|
" This is not a real filetype plugin. It allows for someone to set 'filetype'
|
|
" to "bash" in the modeline, and gets the effect of filetype "sh" with
|
|
" b:is_bash set. Idea from Mahmode Al-Qudsi.
|
|
|
|
if exists("b:did_ftplugin")
|
|
finish
|
|
endif
|
|
|
|
unlet! b:is_sh
|
|
unlet! b:is_kornshell
|
|
let b:is_bash = 1
|
|
|
|
runtime! ftplugin/sh[.]{vim,lua} ftplugin/sh_*.{vim,lua} ftplugin/sh/*.{vim,lua}
|
|
|
|
" vim: ts=8
|