Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TREESITTER ERROR!!! #333

Open
RobertMiguel opened this issue Jun 14, 2024 · 2 comments
Open

TREESITTER ERROR!!! #333

RobertMiguel opened this issue Jun 14, 2024 · 2 comments

Comments

@RobertMiguel
Copy link

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
@gnmearacaun
Copy link
Collaborator

did you run :TSUpdate ?

@gnmearacaun
Copy link
Collaborator

you could try this: #135 (comment)

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

No branches or pull requests

2 participants