Skip to content

FeMaco fails with nvim-treesitter main branch: module 'nvim-treesitter.query' not found #42

@gen4438

Description

@gen4438

Problem

:FeMaco fails to load with the following error when using the nvim-treesitter main branch:

Error executing Lua callback: ...ocal/share/nvim/lazy/nvim-FeMaco.lua/lua/femaco/edit.lua:6: module 'nvim-treesitter.query' not found:
        no field package.preload['nvim-treesitter.query']
        ...
stack traceback:
        [C]: in function 'require'
        ...ocal/share/nvim/lazy/nvim-FeMaco.lua/lua/femaco/edit.lua:6: in main chunk
        [C]: in function 'require'
        ...ocal/share/nvim/lazy/nvim-FeMaco.lua/lua/femaco/init.lua:12: in function <...ocal/share/nvim/lazy/nvim-FeMaco.lua/lua/femaco/init.lua:12>

Cause

The nvim-treesitter main branch has removed the module framework, including nvim-treesitter.query and its get_matches() function, as part of the rewrite described in nvim-treesitter/nvim-treesitter#4767.

The master branch has been archived (May 2025), so this effectively breaks FeMaco for users on current nvim-treesitter.

Environment

  • Neovim: 0.11+
  • nvim-treesitter: main branch

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