Skip to content

Commit

Permalink
feat: inlay hint
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Feb 25, 2024
1 parent cda74fc commit 8d1336f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/language-core/src/generators/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,24 @@ export function* generate(
prop.exp.loc.start.offset,
caps_all,
);
yield _ts([
'',
'template',
prop.exp.loc.end.offset,
disableAllFeatures({
__hint: {
setting: 'vue.inlayHints.vbindShorthand',
label: `="${propVariableName}"`,
tooltip: [
`This is a shorthand for \`${prop.exp.loc.source}="${propVariableName}"\`.`,
'To hide this hint, set `vue.inlayHints.vbindShorthand` to `false` in IDE settings.',
'[More info](https://github.com/vuejs/core/pull/9451)',
].join('\n\n'),
paddingRight: true,
},
})
]);
accessedGlobalVariables.add(propVariableName);
// yield _ts(['', 'template', prop.exp.loc.end.offset, disableAllFeatures({ __combineLastMapping: true })]);
}
}
}
Expand Down

0 comments on commit 8d1336f

Please sign in to comment.