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

see :help vim.lsp.inlay_hint.enable() for updated parameters #365

Closed
5 of 6 tasks
limitLiu opened this issue Apr 19, 2024 · 2 comments · Fixed by #366
Closed
5 of 6 tasks

see :help vim.lsp.inlay_hint.enable() for updated parameters #365

limitLiu opened this issue Apr 19, 2024 · 2 comments · Fixed by #366

Comments

@limitLiu
Copy link

limitLiu commented Apr 19, 2024

Have you read the docs and searched existing issues?

Neovim version (nvim -v)

NVIM v0.10.0-dev-2954+g13ebfafc9

Operating system/version

macOS 14.4.1

Output of :checkhealth rustaceanvim

==============================================================================
rustaceanvim: require("rustaceanvim.health").check()

Checking for Lua dependencies ~
- OK [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) installed.

Checking external dependencies ~
- OK rust-analyzer: found rust-analyzer 0.3.1924-standalone (5dbe3fe75 2024-04-14)
- OK Cargo: found cargo 1.79.0-nightly (48eca1b16 2024-04-12)
- OK rustc: found rustc 1.79.0-nightly (0d8b3346a 2024-04-14)
- OK debug adapter: found codelldb 

Checking config ~
- OK No errors found in config.

Checking for conflicting plugins ~
- OK No conflicting plugins detected.

Checking for tree-sitter parser ~
- OK tree-sitter parser for Rust detected.

How to reproduce the issue

update to NVIM v0.10.0-dev-2954+g13ebfafc9

Expected behaviour

It should have no error message.

Actual behaviour

"see :help vim.lsp.inlay_hint.enable() for updated parameters"

The following is the code after I fixed it.

  -- server_status.lua file
  if type(vim.lsp.inlay_hint) == 'table' then
    for _, bufnr in ipairs(vim.lsp.get_buffers_by_client_id(ctx.client_id)) do
      if vim.lsp.inlay_hint.is_enabled(bufnr) then
        vim.lsp.inlay_hint.enable(false, { bufnr = bufnr })
        vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
      end
    end
  end

The minimal config used to reproduce this issue.

I just updated to the version released on April 19th, where this issue appeared.
@limitLiu limitLiu added the bug Something isn't working label Apr 19, 2024
@mrcjkb mrcjkb removed the bug Something isn't working label Apr 19, 2024
@mrcjkb
Copy link
Owner

mrcjkb commented Apr 19, 2024

Hey 👋

Thanks for reporting.
For future reference, I have a weekly CI action that updates Neovim nightly to catch breaking API changes. So there's no need to open issues like this (hence the I can reproduce the issue with stable Neovim (not a distribution or nightly) checkbox in the issue template).

@dreamerlzl
Copy link

dreamerlzl commented May 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants