docs(lsp): document codelens.get bufnr parameter (#15540)

Alternative to https://github.com/neovim/neovim/pull/15224
This commit is contained in:
Mathias Fußenegger
2021-09-01 13:29:11 +02:00
committed by GitHub
parent 284199bc4b
commit 684550ff38
2 changed files with 6 additions and 1 deletions

View File

@ -44,9 +44,10 @@ end
--- Return all lenses for the given buffer
---
---@param bufnr number Buffer number. 0 can be used for the current buffer.
---@return table (`CodeLens[]`)
function M.get(bufnr)
local lenses_by_client = lens_cache_by_buf[bufnr]
local lenses_by_client = lens_cache_by_buf[bufnr or 0]
if not lenses_by_client then return {} end
local lenses = {}
for _, client_lenses in pairs(lenses_by_client) do