docs: fix syntax errors in examples #38606

This commit is contained in:
skewb1k
2026-03-30 18:49:30 +03:00
committed by GitHub
parent 183933998c
commit 2dce2af768
6 changed files with 9 additions and 9 deletions

View File

@@ -198,7 +198,7 @@ following uses the `virtual_lines` handler when jumping to a diagnostic: >lua
if not diagnostic then return end
vim.diagnostic.show(
diagnostic.namespace
diagnostic.namespace,
bufnr,
{ diagnostic },
{ virtual_lines = { current_line = true }, virtual_text = false }

View File

@@ -816,7 +816,7 @@ Lua module: vim.lsp *lsp-core*
})
vim.lsp.config('…', {
filetypes = { 'my_filetype1', 'my_filetype2' },
}
})
<
• {reuse_client}? (`fun(client: vim.lsp.Client, config: vim.lsp.ClientConfig): boolean`)
Predicate which decides if a client should be
@@ -1752,7 +1752,7 @@ Lua module: vim.lsp.client *lsp-client*
• {cmd_env}? (`table`) Environment variables passed to the
LSP process on spawn. Non-string values are
coerced to string. Example: >lua
{ PORT = 8080; HOST = '0.0.0.0'; }
{ PORT = 8080, HOST = '0.0.0.0' }
<
• {commands}? (`table<string,fun(command: lsp.Command, ctx: table)>`)
Map of client-defined commands overriding the

View File

@@ -1817,8 +1817,8 @@ set({lang}, {query_name}, {text}) *vim.treesitter.query.set()*
'c',
'highlights',
[[;inherits c
(identifier) @spell]])
]])
(identifier) @spell]]
)
<
Parameters: ~

View File

@@ -184,7 +184,7 @@ end
--- })
--- vim.lsp.config('…', {
--- filetypes = { 'my_filetype1', 'my_filetype2' },
--- }
--- })
--- ```
--- @field filetypes? string[]
---

View File

@@ -55,7 +55,7 @@ local all_clients = {}
--- string.
--- Example:
--- ```lua
--- { PORT = 8080; HOST = '0.0.0.0'; }
--- { PORT = 8080, HOST = '0.0.0.0' }
--- ```
--- @field cmd_env? table
---

View File

@@ -268,8 +268,8 @@ local explicit_queries = setmetatable({}, {
--- 'c',
--- 'highlights',
--- [[;inherits c
--- (identifier) @spell]])
--- ]])
--- (identifier) @spell]]
--- )
--- ```
---
---@param lang string Language to use for the query