diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-04-19 14:50:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-19 14:50:12 +0800 |
| commit | 8d77061051d3d5e7b0eb067a0bf776f2c62a7133 (patch) | |
| tree | 742c202d3c09c66a46120225be9f00da85d7d793 /runtime/lua/vim/filetype.lua | |
| parent | 3e6a9fb599f0a774a62cb1090d89202af68aba63 (diff) | |
| download | rneovim-8d77061051d3d5e7b0eb067a0bf776f2c62a7133.tar.gz rneovim-8d77061051d3d5e7b0eb067a0bf776f2c62a7133.tar.bz2 rneovim-8d77061051d3d5e7b0eb067a0bf776f2c62a7133.zip | |
vim-patch:9.1.0354: runtime(uci): No support for uci file types (#28409)
Problem: runtime(uci): No support for uci file types
(Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
(Colin Caine)
closes: vim/vim#14575
https://github.com/vim/vim/commit/4b3fab14dbde971f15d8783e9ef125b19fdbc829
Co-authored-by: Colin Caine <complaints@cmcaine.co.uk>
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat (limited to 'runtime/lua/vim/filetype.lua')
| -rw-r--r-- | runtime/lua/vim/filetype.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index c6ad89320b..bcc745f125 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -14,7 +14,8 @@ local M = {} local function starsetf(ft, opts) return { function(path, bufnr) - local f = type(ft) == 'function' and ft(path, bufnr) or ft + -- Note: when `ft` is a function its return value may be nil. + local f = type(ft) ~= 'function' and ft or ft(path, bufnr) if not vim.g.ft_ignore_pat then return f end @@ -2138,6 +2139,7 @@ local pattern = { ['.*/%.init/.*%.conf'] = 'upstart', ['.*/usr/share/upstart/.*%.override'] = 'upstart', ['.*%.[Ll][Oo][Gg]'] = detect.log, + ['.*/etc/config/.*'] = starsetf(detect.uci), ['.*%.vhdl_[0-9].*'] = starsetf('vhdl'), ['.*%.ws[fc]'] = 'wsh', ['.*/Xresources/.*'] = starsetf('xdefaults'), |