Vim's matchit plugin cannot match some SystemVerilog keywords like class/endclass due to missing config. This PR aims to support it.
https://github.com/vim/vim/pull/8195
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Related to neovim/neovim#14505
@dpelle commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
> @@ -1,11 +1,38 @@ " Vim filetype plugin file " Language: SystemVerilog " Maintainer: kocha <kocha.ls...@gmail.com>
Thanks. Have you emailed the current maintainer?
@Kocha commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
>
if exists("b:did_ftplugin")
finish
endif
" Behaves just like Verilog
runtime! ftplugin/verilog.vim
+
+" Add SystemVerilog keywords for matchit plugin.
+if exists("loaded_matchit")
+ let b:match_words =
+ \ '\<begin\>:\<end\>,' .
+ \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
+ \ '\<module\>:\<endmodule\>,' .
+ \ '\<if\>:`\@<!\<else\>,' .
+ \ '\<function\>:\<endfunction\>,' .
+ \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
+ \ '\<task\>:\<endtask\>,' .
+ \ '\<specify\>:\<endspecify\>,' .
+ \ '\<config\>:\<endconfig\>,' .
+ \ '\<generate\>:\<endgenerate\>,' .
+ \ '\<fork\>:\<join\>,' .
Add join_any and join_none
'\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,'
@elsdrium commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
>
if exists("b:did_ftplugin")
finish
endif
" Behaves just like Verilog
runtime! ftplugin/verilog.vim
+
+" Add SystemVerilog keywords for matchit plugin.
+if exists("loaded_matchit")
+ let b:match_words =
+ \ '\<begin\>:\<end\>,' .
+ \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
+ \ '\<module\>:\<endmodule\>,' .
+ \ '\<if\>:`\@<!\<else\>,' .
+ \ '\<function\>:\<endfunction\>,' .
+ \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
+ \ '\<task\>:\<endtask\>,' .
+ \ '\<specify\>:\<endspecify\>,' .
+ \ '\<config\>:\<endconfig\>,' .
+ \ '\<generate\>:\<endgenerate\>,' .
+ \ '\<fork\>:\<join\>,' .
My last commit 277783d added it.
@elsdrium commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
>
if exists("b:did_ftplugin")
finish
endif
" Behaves just like Verilog
runtime! ftplugin/verilog.vim
+
+" Add SystemVerilog keywords for matchit plugin.
+if exists("loaded_matchit")
+ let b:match_words =
+ \ '\<begin\>:\<end\>,' .
+ \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
+ \ '\<module\>:\<endmodule\>,' .
+ \ '\<if\>:`\@<!\<else\>,' .
+ \ '\<function\>:\<endfunction\>,' .
+ \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
+ \ '\<task\>:\<endtask\>,' .
+ \ '\<specify\>:\<endspecify\>,' .
+ \ '\<config\>:\<endconfig\>,' .
+ \ '\<generate\>:\<endgenerate\>,' .
+ \ '\<fork\>:\<join\>,' .
Thank you! My last commit 4699600 fixes it.
@Kocha commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
>
if exists("b:did_ftplugin")
finish
endif
" Behaves just like Verilog
runtime! ftplugin/verilog.vim
+
+" Add SystemVerilog keywords for matchit plugin.
+if exists("loaded_matchit")
+ let b:match_words =
+ \ '\<begin\>:\<end\>,' .
+ \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
+ \ '\<module\>:\<endmodule\>,' .
+ \ '\<if\>:`\@<!\<else\>,' .
+ \ '\<function\>:\<endfunction\>,' .
+ \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
+ \ '\<task\>:\<endtask\>,' .
+ \ '\<specify\>:\<endspecify\>,' .
+ \ '\<config\>:\<endconfig\>,' .
+ \ '\<generate\>:\<endgenerate\>,' .
+ \ '\<fork\>:\<join\>,' .
LGTM 👍
Merging #8195 (4699600) into master (68db996) will decrease coverage by
86.88%.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #8195 +/- ## =========================================== - Coverage 89.35% 2.46% -86.89% =========================================== Files 148 146 -2 Lines 166808 161671 -5137 =========================================== - Hits 149051 3990 -145061 - Misses 17757 157681 +139924
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | ? |
|
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 2.46% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/sha256.c | 0.00% <0.00%> (-97.96%) |
⬇️ |
| src/digraph.c | 0.00% <0.00%> (-97.78%) |
⬇️ |
| src/gui_gtk_f.c | 0.00% <0.00%> (-97.54%) |
⬇️ |
| src/match.c | 0.00% <0.00%> (-97.13%) |
⬇️ |
| src/crypt_zip.c | 0.00% <0.00%> (-97.06%) |
⬇️ |
| src/evalbuffer.c | 0.00% <0.00%> (-96.83%) |
⬇️ |
| src/debugger.c | 0.00% <0.00%> (-96.62%) |
⬇️ |
| src/libvterm/src/rect.h | 0.00% <0.00%> (-96.56%) |
⬇️ |
| src/textprop.c | 0.00% <0.00%> (-96.41%) |
⬇️ |
| src/evalfunc.c | 0.00% <0.00%> (-96.19%) |
⬇️ |
| ... and 134 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 68db996...4699600. Read the comment docs.
@elsdrium commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
> @@ -1,11 +1,38 @@ " Vim filetype plugin file " Language: SystemVerilog " Maintainer: kocha <kocha.ls...@gmail.com>
@dpelle
Yes. What's the next step? Thanks
@dpelle commented on this pull request.
In runtime/ftplugin/systemverilog.vim:
> @@ -1,11 +1,38 @@ " Vim filetype plugin file " Language: SystemVerilog " Maintainer: kocha <kocha.ls...@gmail.com>
Yes, what's the next step?
All good on your side then. And I see that the mainainer @Kocha commented and approved the review.
I'll include it, thanks.
Closed #8195.