Skip to content

Commit

Permalink
fix(inlayHint): hl_group for vim (#4962)
Browse files Browse the repository at this point in the history
related #4950

Set hl group for hint in Vim
  • Loading branch information
fannheyward committed Mar 28, 2024
1 parent a057378 commit ede39ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handler/inlayHint/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ export default class InlayHintBuffer implements SyncItem {
let line = this.doc.getline(position.line)
let col = byteIndex(line, position.character) + 1
if (item.paddingLeft) {
chunks.push([' '])
chunks.push(nvim.isVim ? [' ', 'Normal'] : [' '])
}
chunks.push([getLabel(item), getHighlightGroup(item.kind)])
if (item.paddingRight) {
chunks.push([' '])
chunks.push(nvim.isVim ? [' ', 'Normal'] : [' '])
}
buffer.setVirtualText(srcId, position.line, chunks, { col, hl_mode: 'replace' })
}
Expand Down

0 comments on commit ede39ea

Please sign in to comment.