diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2021-09-01 13:29:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 13:29:11 +0200 |
commit | 684550ff38b036fd7f3b2ac75121cfd0b3b9c9ca (patch) | |
tree | 508057cc2cca8378538e28094a7b4f11954b0af7 /runtime/lua/vim/lsp/codelens.lua | |
parent | 284199bc4bf36bb74c481da9c8b2a43c1bbbeb51 (diff) | |
download | rneovim-684550ff38b036fd7f3b2ac75121cfd0b3b9c9ca.tar.gz rneovim-684550ff38b036fd7f3b2ac75121cfd0b3b9c9ca.tar.bz2 rneovim-684550ff38b036fd7f3b2ac75121cfd0b3b9c9ca.zip |
docs(lsp): document codelens.get bufnr parameter (#15540)
Alternative to https://github.com/neovim/neovim/pull/15224
Diffstat (limited to 'runtime/lua/vim/lsp/codelens.lua')
-rw-r--r-- | runtime/lua/vim/lsp/codelens.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua index ca5a44077e..6e04bae037 100644 --- a/runtime/lua/vim/lsp/codelens.lua +++ b/runtime/lua/vim/lsp/codelens.lua @@ -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 |