mirror of
https://github.com/neovim/neovim.git
synced 2026-04-25 08:44:06 +00:00
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)
2284f6cca3
* Port foam ft detection to filetype.lua
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user