aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-01-25 16:26:13 +0100
committerChristian Clason <ch.clason+github@icloud.com>2025-01-25 23:56:18 +0100
commitb8e947ed4ed04f9aeef471f579451bbf2bb2993d (patch)
tree4b15762f892090706aee1299e05f45d8fae8a91a
parent974a3f7a438bb772bd681987b25214784c52c7da (diff)
downloadrneovim-b8e947ed4ed04f9aeef471f579451bbf2bb2993d.tar.gz
rneovim-b8e947ed4ed04f9aeef471f579451bbf2bb2993d.tar.bz2
rneovim-b8e947ed4ed04f9aeef471f579451bbf2bb2993d.zip
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 https://github.com/vim/vim/commit/fb49e3cde79de4ce558c86d21a56eb9d60aeabd5 Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/lua/vim/filetype/detect.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua
index 705ce33872..8f66418733 100644
--- a/runtime/lua/vim/filetype/detect.lua
+++ b/runtime/lua/vim/filetype/detect.lua
@@ -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