From f52dadd162de1c747da2b4e76b5cc80bdb8681b1 Mon Sep 17 00:00:00 2001 From: John Castronuovo Date: Wed, 5 Aug 2020 21:42:02 +0200 Subject: [PATCH 1/5] feat(dart_ctags): add tags for enum, export, library, part, and part of --- autoload/tagbar.vim | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 932a682..1efb3f9 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -248,10 +248,16 @@ function! s:InitTypes() abort let type_dart = tagbar#prototypes#typeinfo#new() let type_dart.ctagstype = 'dart' let type_dart.kinds = [ - \ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0}, - \ {'short' : 'C', 'long' : 'consts', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'F', 'long' : 'functions', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'l', 'long' : 'library', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'x', 'long' : 'export', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0}, + \ {'short' : 'P', 'long' : 'part', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'p', 'long' : 'part of', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'C', 'long' : 'consts', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'F', 'long' : 'functions', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'E', 'long' : 'enums', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'e', 'long' : 'constants', 'fold' : 0, 'stl' : 0}, \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 0}, \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0}, \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 0}, @@ -261,13 +267,15 @@ function! s:InitTypes() abort \ {'short' : 'g', 'long' : 'getters', 'fold' : 0, 'stl' : 0}, \ {'short' : 's', 'long' : 'setters', 'fold' : 0, 'stl' : 0}, \ {'short' : 'a', 'long' : 'abstract functions', 'fold' : 0, 'stl' : 0}, - \ ] + \ ] let type_dart.sro = ':' let type_dart.kind2scope = { - \ 'c' : 'class' + \ 'c' : 'class', + \ 'E' : 'enum' \ } let type_dart.scope2kind = { - \ 'class' : 'c' + \ 'class' : 'c', + \ 'enum' : 'E' \ } let type_dart.ctagsbin = dart_ctags let type_dart.ctagsargs = '-l' From 183300ea3a21861b7af4d6bdd8ff10396156955d Mon Sep 17 00:00:00 2001 From: John Castronuovo Date: Wed, 26 Aug 2020 20:16:37 +0200 Subject: [PATCH 2/5] feat(dart_ctags): add tag for mixins --- autoload/tagbar.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 1efb3f9..01ffc66 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -249,13 +249,14 @@ function! s:InitTypes() abort let type_dart.ctagstype = 'dart' let type_dart.kinds = [ \ {'short' : 'l', 'long' : 'library', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'x', 'long' : 'export', 'fold' : 0, 'stl' : 0}, + \ {'short' : 't', 'long' : 'export', 'fold' : 0, 'stl' : 0}, \ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0}, \ {'short' : 'P', 'long' : 'part', 'fold' : 0, 'stl' : 0}, \ {'short' : 'p', 'long' : 'part of', 'fold' : 0, 'stl' : 0}, \ {'short' : 'C', 'long' : 'consts', 'fold' : 0, 'stl' : 0}, \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}, \ {'short' : 'F', 'long' : 'functions', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'x', 'long' : 'mixins', 'fold' : 0, 'stl' : 0}, \ {'short' : 'E', 'long' : 'enums', 'fold' : 0, 'stl' : 0}, \ {'short' : 'e', 'long' : 'constants', 'fold' : 0, 'stl' : 0}, \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 0}, @@ -271,11 +272,13 @@ function! s:InitTypes() abort let type_dart.sro = ':' let type_dart.kind2scope = { \ 'c' : 'class', - \ 'E' : 'enum' + \ 'E' : 'enum', + \ 'x' : 'mixin' \ } let type_dart.scope2kind = { \ 'class' : 'c', - \ 'enum' : 'E' + \ 'enum' : 'E', + \ 'mixin' : 'x' \ } let type_dart.ctagsbin = dart_ctags let type_dart.ctagsargs = '-l' From 78c16121065f6eacd970d9957476934548a0fe17 Mon Sep 17 00:00:00 2001 From: John Castronuovo Date: Wed, 26 Aug 2020 20:26:13 +0200 Subject: [PATCH 3/5] refactor(dart_ctags): improve tag order --- autoload/tagbar.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 9aab69b..bc0496d 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -260,14 +260,14 @@ function! s:InitTypes() abort \ {'short' : 'E', 'long' : 'enums', 'fold' : 0, 'stl' : 0}, \ {'short' : 'e', 'long' : 'constants', 'fold' : 0, 'stl' : 0}, \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'r', 'long' : 'constructors', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'a', 'long' : 'abstract functions', 'fold' : 0, 'stl' : 0}, \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0}, \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 0}, \ {'short' : 'M', 'long' : 'static methods', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'r', 'long' : 'constructors', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'o', 'long' : 'operators', 'fold' : 0, 'stl' : 0}, \ {'short' : 'g', 'long' : 'getters', 'fold' : 0, 'stl' : 0}, \ {'short' : 's', 'long' : 'setters', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'a', 'long' : 'abstract functions', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'o', 'long' : 'operators', 'fold' : 0, 'stl' : 0}, \ ] let type_dart.sro = ':' let type_dart.kind2scope = { From 5e27cdb70b5b19dfb47f6ca3b418a57ece02e99c Mon Sep 17 00:00:00 2001 From: John Castronuovo Date: Wed, 26 Aug 2020 21:55:51 +0200 Subject: [PATCH 4/5] feat(dart_ctags): create scope for imports for dart, pub. local package tags --- autoload/tagbar.vim | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index bc0496d..e97a33e 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -251,6 +251,9 @@ function! s:InitTypes() abort \ {'short' : 'l', 'long' : 'library', 'fold' : 0, 'stl' : 0}, \ {'short' : 't', 'long' : 'export', 'fold' : 0, 'stl' : 0}, \ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0}, + \ {'short' : 'D', 'long' : 'dart', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'U', 'long' : 'pub', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'L', 'long' : 'local', 'fold' : 0, 'stl' : 0}, \ {'short' : 'P', 'long' : 'part', 'fold' : 0, 'stl' : 0}, \ {'short' : 'p', 'long' : 'part of', 'fold' : 0, 'stl' : 0}, \ {'short' : 'C', 'long' : 'consts', 'fold' : 0, 'stl' : 0}, @@ -273,12 +276,14 @@ function! s:InitTypes() abort let type_dart.kind2scope = { \ 'c' : 'class', \ 'E' : 'enum', - \ 'x' : 'mixin' + \ 'x' : 'mixin', + \ 'i' : 'directive' \ } let type_dart.scope2kind = { - \ 'class' : 'c', - \ 'enum' : 'E', - \ 'mixin' : 'x' + \ 'class' : 'c', + \ 'enum' : 'E', + \ 'mixin' : 'x', + \ 'directive' : 'i' \ } let type_dart.ctagsbin = dart_ctags let type_dart.ctagsargs = '-l' From 7dddde55b48a930ac7d92ffca1ff137ebf7c15c8 Mon Sep 17 00:00:00 2001 From: John Castronuovo Date: Thu, 27 Aug 2020 09:54:54 +0200 Subject: [PATCH 5/5] feat(dart_ctags): add inheritance tags --- autoload/tagbar.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index e97a33e..218a420 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -259,10 +259,13 @@ function! s:InitTypes() abort \ {'short' : 'C', 'long' : 'consts', 'fold' : 0, 'stl' : 0}, \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}, \ {'short' : 'F', 'long' : 'functions', 'fold' : 0, 'stl' : 0}, - \ {'short' : 'x', 'long' : 'mixins', 'fold' : 0, 'stl' : 0}, \ {'short' : 'E', 'long' : 'enums', 'fold' : 0, 'stl' : 0}, \ {'short' : 'e', 'long' : 'constants', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'x', 'long' : 'mixins', 'fold' : 0, 'stl' : 0}, \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'd', 'long' : 'extends', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'w', 'long' : 'with', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'z', 'long' : 'implements', 'fold' : 0, 'stl' : 0}, \ {'short' : 'r', 'long' : 'constructors', 'fold' : 0, 'stl' : 0}, \ {'short' : 'a', 'long' : 'abstract functions', 'fold' : 0, 'stl' : 0}, \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},