Skip to content

False warning: treesitter parser was not found #1814

Description

@IstiCusi

Title:
False warning: "norg / norg_meta treesitter parser was not found" despite parsers being installed and working

Body:

Description

Neorg emits the warning:

norg treesitter parser was not found! Many plugin features will not work.
norg_meta treesitter parser was not found! Many plugin features will not work.

However, both parsers (norg and norg_meta) are correctly installed and fully functional via nvim-treesitter.

Expected behavior

No warning should be shown when:

  • parsers exist in runtimepath (parser/*.so)
  • vim.treesitter.language.add() works
  • highlighting and features function correctly

Actual behavior

Neorg reports missing parsers even though:

  • :checkhealth nvim-treesitter shows them as installed
  • vim.treesitter.language.add("norg") works
  • vim.treesitter.language.add("norg_meta") works
  • highlighting and Neorg features work correctly

Root cause (analysis)

The issue originates from:

neorg/modules/core/integrations/treesitter/module.lua

Specifically:

package.searchpath("parser." .. lang, package.cpath)

This relies on package.cpath, which does not reflect how nvim-treesitter manages parsers (runtimepath-based).

Result:
Parsers exist and work, but Neorg fails to detect them → false negative.

Workaround

Disabling Neorg’s parser handling removes the warning:

["core.integrations.treesitter"] = {
config = {
configure_parsers = false,
warn_missing_parsers = false,
},
}

Environment

  • Neovim: 0.12.1
  • nvim-treesitter: latest
  • Neorg: latest stable
  • OS: Linux (Ubuntu 24.04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions