vim-patch:fb49e3c: runtime(filetype): commit 99181205c5f8284a3 breaks V lang detection

so make the regex more strict and have it check for a parenthesis.

See:
https://github.com/vlang/v/blob/master/examples/submodule/mymodules/submodule/sub_functions.v

related: vim/vim#16513

fb49e3cde7

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Clason
2025-01-25 16:26:13 +01:00
committed by Christian Clason
parent 974a3f7a43
commit b8e947ed4e

View File

@ -1777,7 +1777,7 @@ function M.v(_, bufnr)
or line:find('%(%*') and not line:find('/[/*].*%(%*')
then
return 'coq'
elseif findany(line, { ';%s*$', ';%s*/[/*]', '^%s*module' }) then
elseif findany(line, { ';%s*$', ';%s*/[/*]', '^%s*module%s+%w+%s*%(' }) then
return 'verilog'
end
end