From fbce9f421ad1ad466126a24524ade9df978486d5 Mon Sep 17 00:00:00 2001 From: beardedsakimonkey <54521218+beardedsakimonkey@users.noreply.github.com> Date: Sun, 20 Nov 2022 20:09:35 +0000 Subject: feat(diagnostic): add `suffix` option to `open_float()` (#21130) Closes #18687 This introduces a `suffix` option to `vim.diagnostic.open_float()` (and consequently `vim.diagnostic.config()`) that appends some text to each diagnostic in the float. It accepts the same types as `prefix`. For multiline diagnostics, the suffix is only appended to the last line. By default, the suffix will render the diagnostic error code, if any. --- runtime/doc/diagnostic.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index d30d6c28a0..53046b399f 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -618,6 +618,9 @@ open_float({opts}, {...}) *vim.diagnostic.open_float()* {prefix} is a string, it is prepended to each diagnostic in the window with no highlight. Overrides the setting from |vim.diagnostic.config()|. + • suffix: Same as {prefix}, but appends the text to the + diagnostic instead of prepending it. Overrides the setting + from |vim.diagnostic.config()|. Return: ~ tuple ({float_bufnr}, {win_id}) -- cgit