diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index e8a2e3f823..dae60b7d34 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -531,6 +531,8 @@ Lua module: vim.diagnostic *diagnostic-api* |vim.diagnostic.Opts.Jump|. *vim.diagnostic.Opts.Float* + Extends: |vim.lsp.util.open_floating_preview.Opts| + Fields: ~ • {bufnr}? (`integer`, default: current buffer) Buffer number @@ -538,7 +540,7 @@ Lua module: vim.diagnostic *diagnostic-api* • {namespace}? (`integer`) Limit diagnostics to the given namespace • {scope}? (`'line'|'buffer'|'cursor'|'c'|'l'|'b'`, default: `line`) Show diagnostics from the whole buffer - (`buffer"`, the current cursor line (`line`), or the + (`buffer`), the current cursor line (`line`), or the current cursor position (`cursor`). Shorthand versions are also accepted (`c` for `cursor`, `l` for `line`, `b` for `buffer`). @@ -587,8 +589,6 @@ Lua module: vim.diagnostic *diagnostic-api* Same as {prefix}, but appends the text to the diagnostic instead of prepending it. Overrides the setting from |vim.diagnostic.config()|. - • {focus_id}? (`string`) - • {border}? (`string`) see |nvim_open_win()|. *vim.diagnostic.Opts.Jump* diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index ac4fefaa2c..f35f9aabcb 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -109,7 +109,7 @@ end --- @field signs vim.diagnostic.Opts.Signs --- @field severity_sort {reverse?:boolean} ---- @class vim.diagnostic.Opts.Float +--- @class vim.diagnostic.Opts.Float : vim.lsp.util.open_floating_preview.Opts --- --- Buffer number to show diagnostics from. --- (default: current buffer) @@ -118,7 +118,7 @@ end --- Limit diagnostics to the given namespace --- @field namespace? integer --- ---- Show diagnostics from the whole buffer (`buffer"`, the current cursor line +--- Show diagnostics from the whole buffer (`buffer`), the current cursor line --- (`line`), or the current cursor position (`cursor`). Shorthand versions --- are also accepted (`c` for `cursor`, `l` for `line`, `b` for `buffer`). --- (default: `line`) @@ -173,10 +173,6 @@ end --- prepending it. --- Overrides the setting from |vim.diagnostic.config()|. --- @field suffix? string|table|(fun(diagnostic:vim.Diagnostic,i:integer,total:integer): string, string) ---- ---- @field focus_id? string ---- ---- @field border? string see |nvim_open_win()|. --- @class vim.diagnostic.Opts.Underline ---