File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ The following settings are supported:
5555- ` yaml.style.flowMapping ` : Forbids flow style mappings if set to ` forbid `
5656- ` yaml.style.flowSequence ` : Forbids flow style sequences if set to ` forbid `
5757- ` yaml.keyOrdering ` : Enforces alphabetical ordering of keys in mappings when set to ` true ` . Default is ` false `
58- - ` yaml.showSchemaSource ` : Enable/disable showing the schema source in hover tooltips. Default is ` true `
58+ - ` yaml.hoverSchemaSource ` : Enable/disable showing the schema source in hover tooltips. Default is ` true `
5959
6060## Suppressing diagnostics
6161
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ export class SettingsHandler {
7777 if ( Object . prototype . hasOwnProperty . call ( settings . yaml , 'completion' ) ) {
7878 this . yamlSettings . yamlShouldCompletion = settings . yaml . completion ;
7979 }
80- if ( Object . prototype . hasOwnProperty . call ( settings . yaml , 'showSchemaSource ' ) ) {
81- this . yamlSettings . yamlShowSchemaSource = settings . yaml . showSchemaSource ;
80+ if ( Object . prototype . hasOwnProperty . call ( settings . yaml , 'hoverSchemaSource ' ) ) {
81+ this . yamlSettings . yamlhoverSchemaSource = settings . yaml . hoverSchemaSource ;
8282 }
8383 this . yamlSettings . customTags = settings . yaml . customTags ? settings . yaml . customTags : [ ] ;
8484
@@ -283,7 +283,7 @@ export class SettingsHandler {
283283 flowSequence : this . yamlSettings . style ?. flowSequence ,
284284 yamlVersion : this . yamlSettings . yamlVersion ,
285285 keyOrdering : this . yamlSettings . keyOrdering ,
286- showSchemaSource : this . yamlSettings . yamlShowSchemaSource ,
286+ hoverSchemaSource : this . yamlSettings . yamlhoverSchemaSource ,
287287 } ;
288288
289289 if ( this . yamlSettings . schemaAssociations ) {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class YAMLHover {
2727 private shouldHover : boolean ;
2828 private shouldHoverAnchor : boolean ;
2929 private indentation : string ;
30- private showSchemaSource : boolean ;
30+ private hoverSchemaSource : boolean ;
3131 private schemaService : YAMLSchemaService ;
3232
3333 constructor (
@@ -43,7 +43,7 @@ export class YAMLHover {
4343 this . shouldHover = languageSettings . hover ;
4444 this . shouldHoverAnchor = languageSettings . hoverAnchor ;
4545 this . indentation = languageSettings . indentation ;
46- this . showSchemaSource = languageSettings . showSchemaSource ?? true ;
46+ this . hoverSchemaSource = languageSettings . hoverSchemaSource ?? true ;
4747 }
4848 }
4949
@@ -210,7 +210,7 @@ export class YAMLHover {
210210 result += `\`\`\`yaml\n${ example } \`\`\`\n` ;
211211 } ) ;
212212 }
213- if ( result . length > 0 && schema . schema . url && this . showSchemaSource ) {
213+ if ( result . length > 0 && schema . schema . url && this . hoverSchemaSource ) {
214214 result = ensureLineBreak ( result ) ;
215215 result += l10n . t ( 'Source: [{0}]({1})' , getSchemaName ( schema . schema ) , schema . schema . url ) ;
216216 }
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export interface LanguageSettings {
129129 /**
130130 * Show schema source URI in hover popups. Default is true.
131131 */
132- showSchemaSource ?: boolean ;
132+ hoverSchemaSource ?: boolean ;
133133}
134134
135135export interface WorkspaceContextService {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export interface Settings {
3737 keyOrdering : boolean ;
3838 maxItemsComputed : number ;
3939 yamlVersion : YamlVersion ;
40- showSchemaSource : boolean ;
40+ hoverSchemaSource : boolean ;
4141 } ;
4242 http : {
4343 proxy : string ;
@@ -81,7 +81,7 @@ export class SettingsState {
8181 yamlShouldHover = true ;
8282 yamlShouldHoverAnchor = true ;
8383 yamlShouldCompletion = true ;
84- yamlShowSchemaSource = true ;
84+ yamlhoverSchemaSource = true ;
8585 schemaStoreSettings = [ ] ;
8686 customTags = [ ] ;
8787 schemaStoreEnabled = true ;
Original file line number Diff line number Diff line change @@ -1288,11 +1288,11 @@ Source: [${SCHEMA_ID}](file:///${SCHEMA_ID})`
12881288 } ) ;
12891289 } ) ;
12901290
1291- describe ( 'showSchemaSource configuration' , ( ) => {
1292- it ( 'Hover should not show schema source when showSchemaSource is false' , async ( ) => {
1291+ describe ( 'hoverSchemaSource configuration' , ( ) => {
1292+ it ( 'Hover should not show schema source when hoverSchemaSource is false' , async ( ) => {
12931293 const languageSettingsSetupWithoutSource = new ServiceSetup ( )
12941294 . withHover ( )
1295- . withShowSchemaSource ( false )
1295+ . withhoverSchemaSource ( false )
12961296 . withSchemaFileMatch ( {
12971297 uri : SCHEMA_ID ,
12981298 fileMatch : [ '*.yaml' ] ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class ServiceSetup {
2222 yamlVersion : '1.2' ,
2323 flowMapping : 'allow' ,
2424 flowSequence : 'allow' ,
25- showSchemaSource : true ,
25+ hoverSchemaSource : true ,
2626 } ;
2727
2828 withValidate ( ) : ServiceSetup {
@@ -83,8 +83,8 @@ export class ServiceSetup {
8383 return this ;
8484 }
8585
86- withShowSchemaSource ( show : boolean ) : ServiceSetup {
87- this . languageSettings . showSchemaSource = show ;
86+ withhoverSchemaSource ( show : boolean ) : ServiceSetup {
87+ this . languageSettings . hoverSchemaSource = show ;
8888 return this ;
8989 }
9090}
You can’t perform that action at this time.
0 commit comments