From e8776074f50593df90402a3642236990edfba6f0 Mon Sep 17 00:00:00 2001 From: Omar El Halabi Date: Tue, 30 May 2023 00:44:23 +0200 Subject: vim-patch:9.0.1591: some "gomod" files are not recognized (#23820) Problem: Some "gomod" files are not recognized. Solution: Check for "go.mod" file name before checking out the contents. (Omar El Halabi, closes vim/vim#12462) https://github.com/vim/vim/commit/c9fbd2560f24180d2efa40028ed68427341d2d99 --- runtime/lua/vim/filetype/detect.lua | 4 ++-- test/old/testdir/test_filetype.vim | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index 94106a3547..70e590ed10 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -771,14 +771,14 @@ end function M.mod(path, bufnr) if vim.g.filetype_mod then return vim.g.filetype_mod + elseif matchregex(path, [[\c\