Skip to content

Commit

Permalink
Merge pull request #357 from Shane-XB-Qian/fix_inlay_maybe_delayed
Browse files Browse the repository at this point in the history
fix: inlay hints maybe a bit delayed if sync init
  • Loading branch information
yegappan authored Nov 28, 2023
2 parents 3897040 + 4bb3ab0 commit 10ded53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autoload/lsp/inlayhints.vim
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ export def BufferInit(lspserver: dict<any>, bnr: number)
group: 'LspInlayHints',
cmd: $'LspInlayHintsUpdateStop({bnr})'})

# Inlay hints maybe a bit delayed if it was a sync init lsp server.
if lspserver.syncInit
acmds->add({bufnr: bnr,
event: ['User'],
group: 'LspAttached',
cmd: $'LspInlayHintsUpdateNow({bnr})'})
endif

autocmd_add(acmds)
enddef

Expand Down

0 comments on commit 10ded53

Please sign in to comment.