Skip to content

[BUG] <BUG> Two different versions of nvim-treesitter #4188

@guilherme-takata

Description

@guilherme-takata

Plugin

nvim-treesitter

Nixpkgs Release

unstable

Home Manager Release

None

I have read the FAQ

  • I have read the FAQ and my bug is not listed there.

Description

I have a pretty stable configuration of my nixvim, just recently I updated all my flakes inputs and I started getting the error of two different versions of nvim-treesitter when building the flake. Is this a known issue caused by the upstream plugin?

Minimal, Reproducible Example (MRE)

{ config, lib, ... }:
{
  plugins = {
    treesitter = {
      enable = true;
      folding = true;

      settings = {
        highlight = {
          additional_vim_regex_highlighting = true;
          enable = true;
          disable = # Lua
            ''
              function(lang, bufnr)
                return vim.api.nvim_buf_line_count(bufnr) > 10000
              end
            '';
        };

        incremental_selection.enable = true;
        indent.enable = true;
      };
      nixvimInjections = true;
    };

    treesitter-context = {
      inherit (config.plugins.treesitter) enable;
      settings = {
        max_lines = 4;
        min_window_height = 40;
        multiwindow = true;
        separator = "-";
      };
    };

    treesitter-refactor = {
      inherit (config.plugins.treesitter) enable;

      highlightDefinitions = {
        enable = true;
        clearOnCursorMove = true;
      };
      smartRename.enable = true;
      navigation.enable = true;
    };
  };

  keymaps = lib.mkIf config.plugins.treesitter-context.enable [
    {
      mode = "n";
      key = "<leader>uT";
      action = "<cmd>TSContextToggle<cr>";
      options.desc = "Treesitter Context toggle";
    }
  ];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions