fix(docs) fix syntax error in Lua snippet for vim.lsp.document_color #33612

9ff1239634 added support for 'textDocument/documentColor' but the
text snippet in the Lua docs seem to contain a syntax error.
This commit is contained in:
Stephan Seitz
2025-04-24 21:21:23 +02:00
committed by GitHub
parent 276860b538
commit 1670fbee0f
2 changed files with 2 additions and 2 deletions

View File

@ -2167,7 +2167,7 @@ enable({enable}, {bufnr}, {opts}) *vim.lsp.document_color.enable()*
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client:supports_method('textDocument/documentColor')
if client:supports_method('textDocument/documentColor') then
vim.lsp.document_color.enable(true, args.buf)
end
end

View File

@ -248,7 +248,7 @@ end
--- callback = function(args)
--- local client = vim.lsp.get_client_by_id(args.data.client_id)
---
--- if client:supports_method('textDocument/documentColor')
--- if client:supports_method('textDocument/documentColor') then
--- vim.lsp.document_color.enable(true, args.buf)
--- end
--- end