File tree 2 files changed +7
-42
lines changed
2 files changed +7
-42
lines changed Original file line number Diff line number Diff line change @@ -875,10 +875,10 @@ namespace ts.Completions {
875
875
if ( match && reJSDocFragment . lastIndex === jsdocFragment . length ) {
876
876
return {
877
877
kind : match [ 1 ]
878
- // The current position is next to the '@' sign, when no tag name being provided yet.
879
- // Provide a full list of tag names
880
- ? CompletionDataKind . JsDocTagName :
881
- CompletionDataKind . JsDocTag
878
+ // The current position is next to the '@' sign, when no tag name being provided yet.
879
+ // Provide a full list of tag names
880
+ ? CompletionDataKind . JsDocTagName
881
+ : CompletionDataKind . JsDocTag
882
882
} ;
883
883
}
884
884
}
@@ -888,6 +888,9 @@ namespace ts.Completions {
888
888
// Completion should work in the brackets
889
889
const tag = getJsDocTagAtPosition ( currentToken , position ) ;
890
890
if ( tag ) {
891
+ if ( tag . tagName . pos <= position && position <= tag . tagName . end ) {
892
+ return { kind : CompletionDataKind . JsDocTagName } ;
893
+ }
891
894
if ( isTagWithTypeExpression ( tag ) && tag . typeExpression && tag . typeExpression . kind === SyntaxKind . JSDocTypeExpression ) {
892
895
currentToken = getTokenAtPosition ( sourceFile , position ) ;
893
896
if ( ! currentToken ||
Original file line number Diff line number Diff line change 52
52
//// */
53
53
////
54
54
55
- // 4x - jsdoc tag name completions should not occur
56
- /////**@/*40*/ */
57
- ////
58
- /////**
59
- //// *@/*41*/
60
- //// */
61
- ////
62
- /////**
63
- //// * @type {@/*42*/
64
- //// */
65
- ////
66
- /////**
67
- //// +@/*43*/
68
- //// */
69
- ////
70
- /////** some description @/*44*/ */
71
- ////
72
- /////**
73
- //// * ### jsdoc @/*45*/
74
- //// */
75
- ////
76
- /////**
77
- ////@/*46*/
78
- //// */
79
- ////
80
-
81
55
// 5x - jsdoc tag completions should not occur
82
56
/////**
83
57
//// */*50*/
@@ -121,18 +95,6 @@ test.markerNames().forEach(marker => {
121
95
} ;
122
96
break ;
123
97
124
- // 4x - jsdoc tag name completions should not occur
125
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
126
- // before the fix, jsdoc tag names was listed but no longer appears
127
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
128
- case 40 : case 41 : case 42 : case 43 : case 44 : case 45 : case 46 :
129
- completionOpt = {
130
- marker,
131
- triggerCharacter : "@" ,
132
- exact : [ ]
133
- } ;
134
- break ;
135
-
136
98
// 5x - jsdoc tag completions should not occur
137
99
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
138
100
// before the fix, jsdoc tags was listed but no longer appears
You can’t perform that action at this time.
0 commit comments