runtime(filetype): commit 99181205c5f8284a3 breaks V lang detection
Commit:
https://github.com/vim/vim/commit/fb49e3cde79de4ce558c86d21a56eb9d60aeabd5
Author: Christian Brabandt <[email protected]>
Date: Sat Jan 25 16:18:51 2025 +0100
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: #16513
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 819f51f57..a74030522 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -1429,8 +1429,8 @@ export def FTv()
# Verilog: line ends with ';' followed by an optional variable number of
# spaces and an optional start of a comment.
# Example: " b <= a + 1; // Add 1".
- # Alternatively: a module is defined: " module MyModule"
- if line =~ ';\s*\(/[/*].*\)\?$' || line =~ '\C^\s*module\>'
+ # Alternatively: a module is defined: " module MyModule ( input )"
+ if line =~ ';\s*\(/[/*].*\)\?$' || line =~ '\C^\s*module\s\+\w\+\s*('
setf verilog
return
endif
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1tbi6k-000nwL-Ux%40256bit.org.