neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 94bc7f47bf1fefaf2e1f25aabcf04c40882b7d48
parent f048298e9abc3081a1ed170cc5d45c8af9130ce9
Author: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Date:   Sat,  3 May 2025 16:45:32 +0100

docs: fixups (#33815)

- Add missing diagnostics virtual lines hl groups.
- Fix LSP dynamic registration example; curbuf may not actually be attached to
  the client, and it may be attached to many such buffers.
Diffstat:
Mruntime/doc/diagnostic.txt | 20++++++++++++++++++++
Mruntime/doc/lsp.txt | 6++++--
2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt @@ -269,6 +269,26 @@ DiagnosticVirtualTextHint DiagnosticVirtualTextOk Used for "Ok" diagnostic virtual text. + *hl-DiagnosticVirtualLinesError* +DiagnosticVirtualLinesError + Used for "Error" diagnostic virtual lines. + + *hl-DiagnosticVirtualLinesWarn* +DiagnosticVirtualLinesWarn + Used for "Warn" diagnostic virtual lines. + + *hl-DiagnosticVirtualLinesInfo* +DiagnosticVirtualLinesInfo + Used for "Info" diagnostic virtual lines. + + *hl-DiagnosticVirtualLinesHint* +DiagnosticVirtualLinesHint + Used for "Hint" diagnostic virtual lines. + + *hl-DiagnosticVirtualLinesOk* +DiagnosticVirtualLinesOk + Used for "Ok" diagnostic virtual lines. + *hl-DiagnosticUnderlineError* DiagnosticUnderlineError Used to underline "Error" diagnostics. diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt @@ -569,8 +569,10 @@ LspAttach *LspAttach* if not client then return end - -- Call your custom on_attach logic... - -- my_on_attach(client, vim.api.nvim_get_current_buf()) + for bufnr, _ in pairs(client.attached_buffers) do + -- Call your custom on_attach logic... + -- my_on_attach(client, bufnr) + end return result end end)(vim.lsp.handlers['client/registerCapability'])