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

bug: in nightly, i get unhandled error in hacks.lua file at 111 #748

Open
3 tasks done
daUnknownCoder opened this issue Mar 18, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@daUnknownCoder
Copy link

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.0-dev-2626+g9d315fb8b7

Operating system/version

6.7.9-arch1-1

Describe the bug

[lspconfig] unhandled error: ...hare/NeutronVim/lazy/noice.nvim/lua/noice/util/hacks.lua:111: Vim:LSP[lua_ls]: Error ON_ATTACH_ERROR: "vim/keymap.lua:0: rhs: expected string|function, got nil"

It's coming from a function:

function M.fix_redraw()
  local nvim_cmd = vim.api.nvim_cmd

  local function wrap(fn, ...)
    local inside_redraw = M.inside_redraw

    M.inside_redraw = true

    ---@type boolean, any
    local ok, ret = pcall(fn, ...)

    -- check if the ui needs updating
    Util.try(Router.update)

    if not inside_redraw then
      M.inside_redraw = false
    end

    if ok then
      return ret
    end
    error(ret) -- 111
  end

Steps To Reproduce

Just open a random buffer

Expected Behavior

There should be no error popping, it doesnt affect noice but its wierd...

Repro

return {
  "folke/noice.nvim",
  event = "VimEnter",
  lazy = true,
  opts = {
    lsp = {
      override = {
        ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
        ["vim.lsp.util.stylize_markdown"] = true,
        ["cmp.entry.get_documentation"] = true,
      },
      signature = {
        enabled = false,
      },
      progress = {
        enabled = false,
      },
      message = {
        enabled = false,
      },
      hover = {
        enabled = false,
      },
    },
    presets = {
      long_message_to_split = true,
      lsp_doc_border = true,
      bottom_search = true,
    },
    routes = {
      {
        filter = {
          event = "notify",
          min_height = 10,
        },
        view = "split",
      },
      {
        filter = {
          event = "msg_show",
          any = {
            { find = "%d+L, %d+B" },
            { find = "; after #%d+" },
            { find = "; before #%d+" },
          },
        },
        view = "mini",
      },
    },
    cmdline = {
      format = {
        cmdline = { pattern = "^:", icon = "󰞷", lang = "vim" },
      },
    },
    views = {
      mini = {
        win_options = {
          winblend = 0,
        },
      },
      cmdline_popup = {
        position = {
          row = "50%",
        },
        size = {
          width = "75%",
          height = "auto",
        },
        border = {
          style = "single",
        },
        filter_options = {},
        win_options = {
          winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
        },
      },
    },
  },
}
@daUnknownCoder daUnknownCoder added the bug Something isn't working label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant