yioneko / vtsls

LSP wrapper for typescript extension of vscode
Other
486 stars 7 forks source link

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

Open OysterD3 opened 4 months ago

OysterD3 commented 4 months ago

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

image

yioneko commented 4 months ago

This seems an error caused by underlying tsserver: https://github.com/microsoft/TypeScript/issues/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 commented 4 months ago

@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 commented 3 months ago

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 commented 3 months ago

where do I have to put this workaround

thallada commented 3 months ago

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 commented 2 months ago

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 complete blocks the entire window of the file I'm editing -- and it works.