You can add the *.sv
extension for Verilog in Tools > Configuration Files > file_extensions.conf, so that whenever you open a .sv file in Geany it gets detected and highlighted as a Verilog file.
But I'm not sure having Geany include that extension association by default would be a good idea.
Keep in mind that there will still be many SystemVerilog keywords that won't be highlighted as such, such as class
, interface
, package
, import
, assert
, logic
, etc. (You can also add those yourself in Tools > Configuration Files > Filetype Configuration > Programming Languages > filetypes.verilog, under [keywords]
.)
Also, the parser will not generate symbols for classes, structs, interfaces, etc in the list of symbols the way it does for other object-oriented languages such as C++; and it is possible that some SystemVerilog-only constructs lead to incorrect highlighting/folding when ignored or interpreted as plain Verilog. (There's no way to change this via config files.) So ultimately, SystemVerilog support will not be complete; just a workaround to view SystemVerilog files with almost correct syntax highlighting, but it won't be perfect.
It could be useful to have Geany include *.sv
as an alternative extension for Verilog files by default (I personally have it configured that way), but I don't know if that would be a good idea since as I said this is more a workaround than an actual implementation of support for SystemVerilog, and adding that extension by default could be seen as Geany implicitly claiming to support SystemVerilog, when it really doesn't. (I don't know what's the policy on file extensions in this project; is it OK to add file extensions even if they're not exactly the same file type?)
A proper solution would be to actually implement a proper SystemVerilog parser in Geany (extending the one for Verilog), and then support both languages, but that's not as trivial as just pretending that .sv are plain Verilog files.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.