diff options
-rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 13 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 3 |
2 files changed, 8 insertions, 8 deletions
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index 8a217a4ac2..95e55ebb21 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -710,12 +710,13 @@ function M.haredoc(path, _) end --- @type vim.filetype.mapfn -function M.html(path, bufnr) - -- Test if the filename follows the Angular component template convention - local filename = fn.fnamemodify(path, ':t') - if filename:find('%.component%.html$') then - return 'htmlangular' - end +function M.html(_, bufnr) + -- Disabled for the reasons mentioned here: + -- https://github.com/vim/vim/pull/13594#issuecomment-1834465890 + -- local filename = fn.fnamemodify(path, ':t') + -- if filename:find('%.component%.html$') then + -- return 'htmlangular' + -- end for _, line in ipairs(getlines(bufnr, 1, 40)) do if diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index f2591c8577..a6df28696c 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -336,8 +336,7 @@ func s:GetFilenameChecks() abort \ 'hoon': ['file.hoon'], \ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'], \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'], - \ 'html': ['file.html', 'file.htm', 'file.cshtml'], - \ 'htmlangular': ['file.component.html'], + \ 'html': ['file.html', 'file.htm', 'file.cshtml', 'file.component.html'], \ 'htmlm4': ['file.html.m4'], \ 'httest': ['file.htt', 'file.htb'], \ 'hurl': ['file.hurl'], |