Skip to content

TREESITTER ERROR!!! #333

Open
Open
@ghost

Description

My neovim is giving an error in the treeitter plugin and I don't know how to solve anything that can help me.

Errors:

Error in decoration provider treeitter/highlighter.win:
Error running lua: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid "bounding" node type:
  (delimiter) @markup.heading.1
   ^

stack trace:
        [C]: in function '_ts_parse_query'
        /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in 'get' function
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in role 'new'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:240: in 'get_query' function
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:188: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:175: in function 'prepare_highlight_states'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:398: in functions
Press ENTER or type a command to continue
Error in decoration provider treeitter/highlighter.win:
Error running lua: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 2:4. Invalid "bounding" node type:
  (delimiter) @markup.heading.1
   ^

stack trace:
        [C]: in function '_ts_parse_query'
        /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in 'get' function
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in role 'new'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:240: in 'get_query' function
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:188: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:175: in function 'prepare_highlight_states'
        /usr/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:398: in functions

My settings:

treeitter.lua

local M = {
}
function M.config()
  local treesitter = require "nvim-treesitter"
  local configs = require "nvim-treesitter.configs"

  configs.setup {
    ensure_installed = { "lua", "java", "javascript", "typescript" }, -- put the language you want in this array
    -- ensure_installed = "all", -- one of "all" or a list of languages
    ignore_install = { "" },                                                       -- List of parsers to ignore installing
    sync_install = false,                                                          -- install languages synchronously (only applied to `ensure_installed`)

    highlight = {
      enable = true,       -- false will disable the whole extension
      disable = { "css" }, -- list of language that will be disabled
    },
    autopairs = {
      enable = true,
    },
    indent = { enable = true, disable = { "python", "css" } },

    context_commentstring = {
      enable = true,
      enable_autocmd = false,
    },
  }
end

return M

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions