aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/diagnostic.lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-09-20 15:32:14 -0600
committerGregory Anders <greg@gpanders.com>2021-09-21 18:54:28 -0600
commitbc652f148f6bb03511e36a0d9c3e383bb22abcfa (patch)
tree0b43a64610da654a2de942a418a10e265ead5868 /runtime/lua/vim/lsp/diagnostic.lua
parentd43151ea0bb194f7463cc8762919cd38546973c2 (diff)
downloadrneovim-bc652f148f6bb03511e36a0d9c3e383bb22abcfa.tar.gz
rneovim-bc652f148f6bb03511e36a0d9c3e383bb22abcfa.tar.bz2
rneovim-bc652f148f6bb03511e36a0d9c3e383bb22abcfa.zip
refactor(diagnostic): remove get_virt_text_chunks()
This function isn't compatible with including diagnostic sources when "source" is "if_many" since it only has access to diagnostics for a single line. Rather than having an inconsistent or incomplete interface, make this function private. It is still exported as part of the module for backward compatibility with vim.lsp.diagnostics, but it can eventually be made into a local function.
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r--runtime/lua/vim/lsp/diagnostic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
index b4557b0e26..c6c08a15d3 100644
--- a/runtime/lua/vim/lsp/diagnostic.lua
+++ b/runtime/lua/vim/lsp/diagnostic.lua
@@ -529,7 +529,7 @@ end
---@return an array of [text, hl_group] arrays. This can be passed directly to
--- the {virt_text} option of |nvim_buf_set_extmark()|.
function M.get_virtual_text_chunks_for_line(bufnr, _, line_diags, opts)
- return vim.diagnostic.get_virt_text_chunks(diagnostic_lsp_to_vim(line_diags, bufnr), opts)
+ return vim.diagnostic._get_virt_text_chunks(diagnostic_lsp_to_vim(line_diags, bufnr), opts)
end
--- Open a floating window with the diagnostics from {position}