mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs(lsp): do not use nvim_command for Vimscript examples
The examples are relevant and applicable for both Lua and Vimscript configurations and the `vim.api.nvim_command` prefixes just add noise that doesn't contribute to the example.
This commit is contained in:
parent
5a24c2c83d
commit
d0fbbea62a
@ -991,9 +991,9 @@ document_highlight() *vim.lsp.buf.document_highlight()*
|
|||||||
triggered by a key mapping or by events such as `CursorHold` ,
|
triggered by a key mapping or by events such as `CursorHold` ,
|
||||||
eg:
|
eg:
|
||||||
>
|
>
|
||||||
vim.api.nvim_command [[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]]
|
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
vim.api.nvim_command [[autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()]]
|
autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
vim.api.nvim_command [[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]]
|
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
<
|
<
|
||||||
|
|
||||||
Note: Usage of |vim.lsp.buf.document_highlight()| requires the
|
Note: Usage of |vim.lsp.buf.document_highlight()| requires the
|
||||||
@ -1061,7 +1061,7 @@ formatting_sync({options}, {timeout_ms})
|
|||||||
|vim.lsp.buf_request_sync()|. Example:
|
|vim.lsp.buf_request_sync()|. Example:
|
||||||
>
|
>
|
||||||
|
|
||||||
vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
|
autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
|
||||||
<
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
|
@ -165,7 +165,7 @@ end
|
|||||||
--- saved. {timeout_ms} is passed on to |vim.lsp.buf_request_sync()|. Example:
|
--- saved. {timeout_ms} is passed on to |vim.lsp.buf_request_sync()|. Example:
|
||||||
---
|
---
|
||||||
--- <pre>
|
--- <pre>
|
||||||
--- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
|
--- autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
|
||||||
--- </pre>
|
--- </pre>
|
||||||
---
|
---
|
||||||
---@param options Table with valid `FormattingOptions` entries
|
---@param options Table with valid `FormattingOptions` entries
|
||||||
@ -447,9 +447,9 @@ end
|
|||||||
--- by events such as `CursorHold`, eg:
|
--- by events such as `CursorHold`, eg:
|
||||||
---
|
---
|
||||||
--- <pre>
|
--- <pre>
|
||||||
--- vim.api.nvim_command [[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]]
|
--- autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
--- vim.api.nvim_command [[autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()]]
|
--- autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
--- vim.api.nvim_command [[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]]
|
--- autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
--- </pre>
|
--- </pre>
|
||||||
---
|
---
|
||||||
--- Note: Usage of |vim.lsp.buf.document_highlight()| requires the following highlight groups
|
--- Note: Usage of |vim.lsp.buf.document_highlight()| requires the following highlight groups
|
||||||
|
Loading…
Reference in New Issue
Block a user