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

-32603: Request textDocument/inlayHint failed with message: #159

Open
OysterD3 opened this issue May 20, 2024 · 8 comments
Open

-32603: Request textDocument/inlayHint failed with message: #159

OysterD3 opened this issue May 20, 2024 · 8 comments

Comments

@OysterD3
Copy link

I have been getting this message since today. Any clue?

image

@yioneko
Copy link
Owner

yioneko commented May 20, 2024

This seems an error caused by underlying tsserver: microsoft/TypeScript#53984, and cannot be fixed here. You can try to reproduce it with VSCode and the same file, and report the error to VSCode or Typescript repo.

@foo4foo
Copy link

foo4foo commented Jun 4, 2024

@yioneko Can we suppress the dialog for -32603: Request textDocument/* errors in vtsls config for neovim ? I'm facing a similar issue and I'd like to hide/ignore the error popup in neovim.

@yioneko
Copy link
Owner

yioneko commented Jun 5, 2024

Can we suppress the dialog for -32603: Request textDocument/* errors in vtsls config for neovim ?

Suppressing error is strongly not recommended, only do this if you previously knew about the errors and their impacts:

local notify = vim.notify
local filtered_notify = function(...)
  local msg, level = select(1, ...)
  if level == vim.log.levels.ERROR and string.match(msg, "vtsls: %-%d+") then
    return -- ignored
  end
  return notify(...)
end
vim.notify = filtered_notify

@mh-trimble
Copy link

where do I have to put this workaround

@thallada
Copy link

I was able to hide this error by adding this to the noice config (~/.config/nvim/lua/plugins/noice.nvim in my lazyvim setup):

return {
  "folke/noice.nvim",
  event = "VeryLazy",
  -- REMOVE THIS once this issue is fixed: https://github.com/yioneko/vtsls/issues/159
  opts = {
    routes = {
      {
        filter = {
          event = "notify",
          find = "Request textDocument/inlayHint failed",
        },
        opts = { skip = true },
      },
    },
  },
}

@arantebw
Copy link

arantebw commented Jul 22, 2024

I was able to hide this error by adding this to the noice config (~/.config/nvim/lua/plugins/noice.nvim in my lazyvim setup):

return {
  "folke/noice.nvim",
  event = "VeryLazy",
  -- REMOVE THIS once this issue is fixed: https://github.com/yioneko/vtsls/issues/159
  opts = {
    routes = {
      {
        filter = {
          event = "notify",
          find = "Request textDocument/inlayHint failed",
        },
        opts = { skip = true },
      },
    },
  },
}

I encountered this error today, and followed this workaround for now -- I have to do this because the dialog completely blocks the entire window of the file I'm editing -- and it works.

@kblcuk
Copy link

kblcuk commented Dec 18, 2024

Fwiw I'm getting pretty similar error, except message starts with Request textDocument/documentHighlight failed (and the same filtering fix config for noice works as expected).

@cncsl
Copy link

cncsl commented Dec 26, 2024

Solution suggestions: if you use nvim-notify, you can modify the configuration like this. It works for me:

  {
    "rcarriga/nvim-notify",
    config = function()
      vim.notify = function(msg, ...)
        -- temporarily block notifications of vtls inlayHint exception
        if string.match(msg, "(vtsls: %-32603)") then return end
        require "notify"(msg, ...)
      end
    end,
  },

If you're editing configuration files with lua_ls, you might see a warning about a "Duplicate field notify". This is expected and can be safely ignored.

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

No branches or pull requests

8 participants