On Sunday, 16 December 2018 at 09:59:12 UTC, David wrote:
I am wondering how I could display (nested) local variables and
functions in vim's tagbar (majutsushi/tagbar) using dscanner?
So far I only see gloable variables, functions, ...
=========== script.d ==========
import std.stdio;
enum globalEnum1 { A = 1, B = 2 }
enum globalEnum2 { C, D }
void globalFun(){ writeln("global"); }
double globalDouble = 2.3;
string globalString = "hi";
void main(){
enum localEnum { A = 1, B = 2 }
void localFun(){ writeln("local"); }
double localDouble = 2.3;
}
===========
=========== Tagbar shows: ===========
◢ functions
globalFun()
main()
◢ globalEnum1 : enum
[enumerators]
A
B
◢ globalEnum2 : enum
[enumerators]
C
D
◢ variables
globalDouble
globalString
===========
I think that's not possible right now, D-Scanner skips over body
functions and unittest blocks to not clutter the tags with
potentially lots of local names.