Skip to content

folding error when using extern function/task with argument #242

Open
@dvtalk

Description

@dvtalk

Hi,
I has been using your vim plug for a while, and it the best so far.
However, when I have a class with extern functions/tasks, the folding will not work expecting from the extern methods with argument which has default value.
As in the picture.
Could you help to fix this.

Thanks a lot
image

My test class:

class test_syn extends uvm_component;
   `uvm_component_utils(test_syn)

   function new(string name = "test_syn", uvm_component parent);
     super.new(name, parent);
   endfunction : new

  extern virtual task    test_syn_task0();
  extern virtual task    test_syn_task1();
  extern virtual task    test_syn_task2();
  extern virtual task    test_syn_task3();
  extern virtual task    test_syn_task4(int b);
  extern virtual task    test_syn_task5(int a = 0);   //folding from here
 
endclass: test_syn

my vim cfg:

augroup filetype_verilog_systemverilog
  autocmd!
  autocmd FileType verilog_systemverilog setlocal foldmethod=syntax
  autocmd FileType verilog_systemverilog let g:verilog_indent_width = 3
  autocmd FileType verilog_systemverilog let g:verilog_efm_uvm_lst = "all"
  autocmd FileType verilog_systemverilog setlocal foldcolumn=2 "defines 2 col at window left, to indicate folding
  autocmd FileType verilog_systemverilog setlocal foldopen=block,insert,hor,search
  autocmd FileType verilog_systemverilog setlocal foldclose=all
  autocmd FileType verilog_systemverilog let g:verilog_efm_uvm_lst = "fatal,error,warning"
  autocmd FileType verilog_systemverilog let g:verilog_syntax_fold_lst = "class,function,task,interface,covergroup,sequence,property,block,instance,specify"
  autocmd FileType verilog_systemverilog setlocal foldlevelstart=1
  autocmd FileType verilog_systemverilog setlocal foldlevel=1
augroup END

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions