mirror of
https://github.com/neovim/neovim.git
synced 2026-04-02 05:39:26 +00:00
docs: fix syntax errors in examples #38606
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1817,8 +1817,8 @@ set({lang}, {query_name}, {text}) *vim.treesitter.query.set()*
|
||||
'c',
|
||||
'highlights',
|
||||
[[;inherits c
|
||||
(identifier) @spell]])
|
||||
]])
|
||||
(identifier) @spell]]
|
||||
)
|
||||
<
|
||||
|
||||
Parameters: ~
|
||||
|
||||
@@ -184,7 +184,7 @@ end
|
||||
--- })
|
||||
--- vim.lsp.config('…', {
|
||||
--- filetypes = { 'my_filetype1', 'my_filetype2' },
|
||||
--- }
|
||||
--- })
|
||||
--- ```
|
||||
--- @field filetypes? string[]
|
||||
---
|
||||
|
||||
@@ -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
|
||||
---
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user