docs: various #25289

Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
This commit is contained in:
Justin M. Keyes
2024-01-18 00:14:48 -08:00
committed by GitHub
parent 11e8e14628
commit 95cbedaa17
12 changed files with 67 additions and 38 deletions

View File

@@ -368,7 +368,13 @@ function M.is_enabled(bufnr)
return bufstates[bufnr] and bufstates[bufnr].enabled or false
end
--- Enable/disable/toggle inlay hints for a buffer
--- Enables or disables inlay hints for a buffer.
---
--- To "toggle", pass the inverse of `is_enabled()`:
---
--- ```lua
--- vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
--- ```
---
--- @param bufnr (integer|nil) Buffer handle, or 0 or nil for current
--- @param enable (boolean|nil) true/nil to enable, false to disable