Skip to content

Commit

Permalink
some part of inlay hint
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Nov 9, 2023
1 parent 45a0661 commit a1990ad
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions packages/language-core/src/generators/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,12 +1319,36 @@ export function generate(
}
}
else if (prop.arg && !prop.exp && prop.arg.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
const propVariableName = camelize(prop.arg.content);
const label = [
{
value: '="'
},
{
value: propVariableName,
// TODO
// command: vscode.Command | undefined;
},
{
value: '"'
},
];
codes.push(
...createInterpolationCode(
camelize(prop.arg.content),
propVariableName,
prop.arg.loc,
prop.arg.loc.start.offset,
caps_diagnosticOnly,
{
...caps_diagnosticOnly,
__hint: {
setting: 'vue.inlayHints.vbindShorthand',
label,
tooltip: [
// TODO
].join('\n\n'),
paddingRight: true,
}
} as FileRangeCapabilities,
'(',
')',
),
Expand Down

0 comments on commit a1990ad

Please sign in to comment.