Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.
This repository was archived by the owner on May 27, 2024. It is now read-only.

Neovim 0.9.1 hangs consuming 100% CPU #45

@r-vdp

Description

@r-vdp

Describe the bug

Since upgrading to neovim 0.9.1, I get random hangs where neovim hangs and consumes 100% CPU on one core for seconds before recovering.
I tried enabling and disabling plugins to find the culprit and it seems to be nvim-ts-rainbow2.

Steps to reproduce

I don't know yet how to trigger the issue, but it happened several times today (I upgraded neovim yesterday night).

Expected behavior

No hangs.

Config

require("nvim-treesitter.configs").setup {
  highlight = {
    enable = true,
    disable = function(lang, buf)
      local max_filesize = 100 * 1024 -- 100 KB
      local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
      if ok and stats and stats.size > max_filesize then
        return true
      end
    end,
  },

  rainbow = {
    enable = true,
    extended_mode = true,
    max_file_lines = 20000,
    query = {
      "rainbow-parens",
      html = "rainbow-tags",
      latex = "rainbow-blocks",
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions