diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-10-19 11:45:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 11:45:51 -0600 |
commit | 064411ea7ff825aed3d4e01207914ed61d7ee79d (patch) | |
tree | f654858daef98f0dc6fb485414d25d6edb5879b9 /test/functional/lua/vim_spec.lua | |
parent | aa4f0879e35c43b186cf51c50f28847dd2df256c (diff) | |
download | rneovim-064411ea7ff825aed3d4e01207914ed61d7ee79d.tar.gz rneovim-064411ea7ff825aed3d4e01207914ed61d7ee79d.tar.bz2 rneovim-064411ea7ff825aed3d4e01207914ed61d7ee79d.zip |
refactor(diagnostic)!: replace 'show_*' functions with 'open_float' (#16057)
'show_line_diagnostics()' and 'show_position_diagnostics()' are
almost identical; they differ only in the fact that the latter also
accepts a column to form a full position, rather than just a line. This
is not enough to justify two separate interfaces for this common
functionality.
Renaming this to simply 'show_diagnostics()' is one step forward, but
that is also not a good name as the '_diagnostics()' suffix is
redundant. However, we cannot name it simply 'show()' since that
function already exists with entirely different semantics.
Instead, combine these two into a single 'open_float()' function that
handles all of the cases of showing diagnostics in a floating window.
Also add a "float" key to 'vim.diagnostic.config()' to provide global
values of configuration options that can be overridden ephemerally.
This makes the float API consistent with the rest of the diagnostic API.
BREAKING CHANGE
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
0 files changed, 0 insertions, 0 deletions