Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete Documentation for vim.diagnostic.open_float Options #29267

Open
kyoh86 opened this issue Jun 10, 2024 · 3 comments
Open

Incomplete Documentation for vim.diagnostic.open_float Options #29267

kyoh86 opened this issue Jun 10, 2024 · 3 comments
Labels
bug issues reporting wrong behavior documentation

Comments

@kyoh86
Copy link

kyoh86 commented Jun 10, 2024

Problem

The documentation for vim.diagnostic.open_float appears to be incomplete or incorrectly formatted.
The option descriptions seem to be truncated or missing some fields.

Additionally, some relevant options such as focus_id and focusable are missing but are present in the vim.lsp.util.open_floating_preview.
It is unclear whether these options are intended to be supported by vim.diagnostic.open_float or not.

Note: I found that we can call vim.diagnostic.open_float({focusable=true}) and observe that it behaves similarly to vim.lsp.buf.hover(), allowing focus to be set on the floating window with a second call.

Steps to reproduce

  1. Open Neovim.
  2. Execute :help vim.diagnostic.open_float to view the help documentation.
  3. Observe the incomplete descriptions for the options.

Expected behavior

We can understand right behaviors and options of vim.diagnostic.open_float.

Neovim version (nvim -v)

NVIM v0.11.0-dev-78d3f47

Vim (not Nvim) behaves the same?

no

Operating system/version

Arch Linux

Terminal name/version

WezTerm

$TERM environment variable

xterm-256color

Installation

build from repo

@kyoh86 kyoh86 added the bug issues reporting wrong behavior label Jun 10, 2024
@kyoh86
Copy link
Author

kyoh86 commented Jun 10, 2024

It's not about a vim.diagnostic.open_float but a vim.diagnostic.Opts.Float

@justinmk
Copy link
Member

in other words, :help vim.diagnostic.Opts.Float is missing some fields available on :help nvim_open_win() ?

@kyoh86
Copy link
Author

kyoh86 commented Jun 10, 2024

We could say that, but I cannot determine where it is written correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior documentation
Projects
None yet
Development

No branches or pull requests

3 participants