]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: inlay hints maybe a bit delayed if sync init
authorshane.xb.qian <shane.qian@foxmail.com>
Sat, 8 Jul 2023 11:54:51 +0000 (19:54 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Tue, 19 Sep 2023 09:58:19 +0000 (17:58 +0800)
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
autoload/lsp/inlayhints.vim

index 726470a30947576edfe1e61406c8f47a5582fad3..bde0783c9191cfeda0c15267ff9ca4da36a1c35f 100644 (file)
@@ -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: $'LspInlayHintsChanged({bnr})'})
+  endif
+
   autocmd_add(acmds)
 enddef