universal-ctags / citre

A superior code reading & auto-completion tool with pluggable backends.
GNU General Public License v3.0
326 stars 26 forks source link

Using size of defintions for sorting #103

Closed masatake closed 2 years ago

masatake commented 2 years ago
#ifdef CONFIG_PROC_FS
static inline void crypto_init_proc(void)
{ }
#else
...
void __init crypto_init_proc(void)
{
    proc_create_seq("crypto", 0, NULL, &crypto_seq_ops);
}

I expect the latter one is listed before the former one in xref buffer. The size of the definition calculated from $end - $line can be used as hints. This is applicable to functions and methods.

AmaiKinono commented 2 years ago

I get the idea. I think I can find time to work on this in several days.

AmaiKinono commented 2 years ago

I've implemented this. Please test.

masatake commented 2 years ago

Works fine. Thank you.