File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,8 @@ export async function testCompletion(
219219 assert . equal (
220220 actualCompletionList . items . length ,
221221 expectedCompletionList . items . length ,
222- "Completion List doesn't have expected size"
222+ "Completion List doesn't have expected size: " +
223+ JSON . stringify ( actualCompletionList . items )
223224 ) ;
224225 expectedCompletionList . items
225226 . sort ( ( a , b ) => ( a . label > b . label ? 1 : - 1 ) )
Original file line number Diff line number Diff line change @@ -49,37 +49,13 @@ export class SettingsState extends YamlSettingsState {
4949 cfnLintIgnoreRules : Array < string > = [ ] ;
5050 cfnLintOverrideSpecPath : string = "" ;
5151
52- indentation : string = " " ;
53-
5452 pendingValidationRequests : { [ uri : string ] : NodeJS . Timeout } = { } ;
5553 validationDelayMs = 200 ;
5654
5755 isPreviewing: { [ index : string ] : boolean } = { } ;
5856
5957 constructor ( ) {
6058 super ( ) ;
61- this . customTags = [
62- "!And sequence" ,
63- "!If sequence" ,
64- "!Not sequence" ,
65- "!Equals sequence" ,
66- "!Or sequence" ,
67- "!FindInMap sequence" ,
68- "!Base64 scalar" ,
69- "!Join sequence" ,
70- "!Cidr sequence" ,
71- "!Ref scalar" ,
72- "!Sub scalar" ,
73- "!Sub sequence" ,
74- "!GetAtt scalar" ,
75- "!GetAtt sequence" ,
76- "!GetAZs mapping" ,
77- "!GetAZs scalar" ,
78- "!ImportValue mapping" ,
79- "!ImportValue scalar" ,
80- "!Select sequence" ,
81- "!Split sequence" ,
82- ] ;
8359 this . schemaStoreEnabled = false ;
8460 }
8561}
Original file line number Diff line number Diff line change @@ -42,6 +42,24 @@ export class LanguageHandlers extends YamlLanguageHandlers {
4242 private cfnLanguageService : LanguageService ;
4343 private cfnSettings : SettingsState ;
4444 private cfnConnection : Connection ;
45+ private customTags : string [ ] = [
46+ "!And" ,
47+ "!Base64" ,
48+ "!Cidr" ,
49+ "!Equals" ,
50+ "!FindInMap" ,
51+ "!GetAtt" ,
52+ "!GetAZs" ,
53+ "!If" ,
54+ "!ImportValue" ,
55+ "!Join" ,
56+ "!Not" ,
57+ "!Or" ,
58+ "!Ref" ,
59+ "!Select" ,
60+ "!Split" ,
61+ "!Sub" ,
62+ ] ;
4563
4664 pendingLimitExceededWarnings : {
4765 [ uri : string ] : {
@@ -119,6 +137,15 @@ export class LanguageHandlers extends YamlLanguageHandlers {
119137 }
120138
121139 if ( this . cfnSettings . yamlShouldCompletion ) {
140+ for ( var fn of this . customTags ) {
141+ results . items . push ( {
142+ label : fn ,
143+ sortText : "zzzzzzzzzz" ,
144+ insertText : fn + " " ,
145+ insertTextFormat : 2 ,
146+ kind : 12 ,
147+ } ) ;
148+ }
122149 try {
123150 if ( node !== null && template !== null ) {
124151 if ( isNode ( node . internalNode ) ) {
You can’t perform that action at this time.
0 commit comments