Skip to content

Conversation

@philwhln
Copy link

Addresses #1732 (comment)

@Vanpaia
Copy link

Vanpaia commented Dec 16, 2025

I wasn't aware of the treesitter API change, this change indeed fixes the issue. Thanks!

@majalcmaj
Copy link

Thank you a lot @philwhln !
I applied this locally and it gets the job done. It would be lovely to have this PR merged - it will save people some nerves ;)

@dIB59
Copy link

dIB59 commented Jan 1, 2026

Thank you @philwhln helped me alot

carlosnsr added a commit to carlosnsr/kickstart.nvim that referenced this pull request Jan 7, 2026
@theopn
Copy link
Contributor

theopn commented Jan 12, 2026

I think we can simply delete the line since Lazy defaults to require("plugin").config if main is not specified.
That is, if the repository becomes maintained again and PRs get merged...

  • Edit: I have been using the master branch so I was not aware, but nvim-treesitter did a major rewrite (essentially reduced to a paerser installer) last December and now directs to Neovim's vim.treesitter module for utilizing any of the Treesitter features. So changing configs to config (or deleting that line altogether) will eliminate the error, but it will not enable treesitter.
    If you are like me and just use the Treesitter for highlighting, use the following config:
return {
  "nvim-treesitter/nvim-treesitter",
  lazy = false,
  build = ":TSUpdate",
  config = function()
    require("nvim-treesitter").setup()

    -- Find the name of parsers with:
    --  := require("nvim-treesitter").get_available()
    -- (LaTeX clashes with Vimtex)
    local languages = { "bash",
      "c", "cpp", "fish", "html", "java", "javascript", "lua", "markdown", "markdown_inline",
      "python", "sql", "vimscript", "vimdoc" }

    local filetypes = {}
    for _, lang in ipairs(languages) do
      for _, ft in ipairs(vim.treesitter.language.get_filetypes(lang)) do
        table.insert(filetypes, ft)
      end
    end

    vim.api.nvim_create_autocmd("FileType", {
      pattern = filetypes,
      callback = function()
        vim.treesitter.start()
        vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
        vim.wo[0][0].foldmethod = "expr"
        -- Indentation is Experimental
        -- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
      end,
    })
  end
}

If you need textobject support or other treesitter features, you now need a separate plugin (e.g., https://github.com/nvim-treesitter/nvim-treesitter-textobjects)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants