digitalmars.D.learn - dscanner --ctags: local variables, functions, ... are now shown in
- David (66/66) Dec 16 2018 I am wondering how I could display (nested) local variables and
- Laurent =?UTF-8?B?VHLDqWd1aWVy?= (4/36) Dec 17 2018 I think that's not possible right now, D-Scanner skips over body
- David (3/6) Dec 17 2018 A pity; nevertheless many thanks for coming back on it!
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
===========
" tagbar:
let g:tagbar_type_d = {
\ 'ctagstype' : 'd',
\ 'kinds' : [
\ 'c:classes:1:1',
\ 'f:functions:1:1',
\ 'T:template:1:1',
\ 'g:enums:1:1',
\ 'e:enumerators:0:0',
\ 'u:unions:1:1',
\ 's:structs:1:1',
\ 'v:variables:1:0',
\ 'i:interfaces:1:1',
\ 'm:members',
\ 'a:alias'
\ ],
\'sro': '.',
\ 'kind2scope' : {
\ 'c' : 'class',
\ 'g' : 'enum',
\ 's' : 'struct',
\ 'u' : 'union',
\ 'T' : 'template',
\},
\ 'scope2kind' : {
\ 'enum' : 'g',
\ 'class' : 'c',
\ 'struct' : 's',
\ 'union' : 'u',
\ 'template' : 'T',
\ },
\ 'ctagsbin' : 'dscanner',
\ 'ctagsargs' : ['--ctags']
\ }
Dec 16 2018
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.
Dec 17 2018
On Monday, 17 December 2018 at 08:56:07 UTC, Laurent Tréguier wrote: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.A pity; nevertheless many thanks for coming back on it!
Dec 17 2018








David <scherd3113 gmail.com>