diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-01-11 21:02:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 21:02:58 +0100 |
commit | 70fe3ce004f1c17328257349da5528757fdcd354 (patch) | |
tree | 06c62d6fe6629d527d34c84541d9ff89be0bdaad /runtime/lua/vim | |
parent | 074b033e7e10baf3f4401a1652c1de197f5b5c4e (diff) | |
download | rneovim-70fe3ce004f1c17328257349da5528757fdcd354.tar.gz rneovim-70fe3ce004f1c17328257349da5528757fdcd354.tar.bz2 rneovim-70fe3ce004f1c17328257349da5528757fdcd354.zip |
vim-patch:8.2.4064: foam files are not detected (#17041)
* vim-patch:8.2.4064: foam files are not detected
Problem: Foam files are not detected.
Solution: Detect the foam filetype by the path and file contents. (Mohammed
Elwardi Fadeli, closes vim/vim#9501)
https://github.com/vim/vim/commit/2284f6cca384e0ccc352bfec7277dc26386cac3d
* Port foam ft detection to filetype.lua
Co-authored-by: Gregory Anders <greg@gpanders.com>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/filetype.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 28cffdf072..3d91abc406 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -860,6 +860,10 @@ local filename = { ["exim.conf"] = "exim", exports = "exports", [".fetchmailrc"] = "fetchmail", + fvSchemes = function() vim.fn["dist#ft#FTfoam"]() end, + fvSolution = function() vim.fn["dist#ft#FTfoam"]() end, + fvConstraints = function() vim.fn["dist#ft#FTfoam"]() end, + fvModels = function() vim.fn["dist#ft#FTfoam"]() end, fstab = "fstab", mtab = "fstab", [".gdbinit"] = "gdb", @@ -1334,6 +1338,14 @@ local pattern = { ["zlog.*"] = starsetf('zsh'), ["zsh.*"] = starsetf('zsh'), ["ae%d+%.txt"] = 'mail', + ["[a-zA-Z0-9]*Dict"] = function() vim.fn["dist#ft#FTfoam"]() end, + ["[a-zA-Z0-9]*Dict%..*"] = function() vim.fn["dist#ft#FTfoam"]() end, + ["[a-zA-Z]*Properties"] = function() vim.fn["dist#ft#FTfoam"]() end, + ["[a-zA-Z]*Properties%..*"] = function() vim.fn["dist#ft#FTfoam"]() end, + [".*Transport%..*"] = function() vim.fn["dist#ft#FTfoam"]() end, + [".*/constant/g"] = function() vim.fn["dist#ft#FTfoam"]() end, + [".*/0/.*"] = function() vim.fn["dist#ft#FTfoam"]() end, + [".*/0%.orig/.*"] = function() vim.fn["dist#ft#FTfoam"]() end, -- END PATTERN } -- luacheck: pop |