vhda / verilog_systemverilog.vim

Verilog/SystemVerilog Syntax and Omni-completion
359 stars 86 forks source link

Typedef classes are not handled by Omnicomplete #225

Open ESodikromo opened 1 year ago

ESodikromo commented 1 year ago

Classes generated through typedefs are not interpreted as having an "inherits" key when calling taglist() inside of s:GetInheritanceTags which breaks it. This can be demonstrated by something along the lines of having this

class base_class; endclass

typedef base_class #(parameter) custom_class;

and evaluating

echom string(taglist('^custom_class$')[0])

after generating a tags file. Notice the lack of "inherits", which is what s:GetInheritanceTags uses. The verbose messaging simply stop at Searching inheritance of <object>. It leads to failing to find any tags from the base classes.

This ties in with the other issues regarding typedefs. This is common in UVM, so it would be great if there was a solution. However, the taglist() output for typedefs seems rather unhelpful, so there might need to be a more robust typedef handling function.

Hope your family is doing well.

vhda commented 1 year ago

Have you followed these instructions on running ctags https://github.com/vhda/verilog_systemverilog.vim/blob/master/doc/verilog_systemverilog.txt#L113 ? That is, are you using Universal Ctags and the arguments --extra=+q --fields=+i -n?

vhda commented 1 year ago

I can see that the inheritance is not included in the tags file... I used to maintain that parser in Universal Ctags, but unfortunately I no longer have any free time to do that. Would you mind reporting this limitation there, in the hope that someone can look into this?

vhda commented 1 year ago

Any updates?