Coder Social home page Coder Social logo

Comments (12)

andymass avatar andymass commented on June 12, 2024 2

@Martinits Did you try to do a :TSUpdate?

from vim-matchup.

Martinits avatar Martinits commented on June 12, 2024 1

Oh, I forgot. Seems everything's fine after update.

from vim-matchup.

unphased avatar unphased commented on June 12, 2024 1

Oh wow TSUpdate also fixed it over here. Thanks.

from vim-matchup.

unphased avatar unphased commented on June 12, 2024

I have now tried this minimal config:

vim.cmd([[
  set nocompatible
  " load match-up
  let &rtp  = '~/.local/share/nvim/lazy/vim-matchup,' . &rtp
  let &rtp .= ',~/.local/share/nvim/lazy/vim-matchup/after'

  " load treesitter
  let &rtp  = '~/.local/share/nvim/lazy/nvim-treesitter,' . &rtp
  let &rtp .= ',~/.local/share/nvim/lazy/nvim-treesitter/after'

  " load other plugins, if necessary
  " let &rtp = '~/path/to/other/plugin,' . &rtp
  filetype plugin indent on
  set nocompatible
  syntax enable
]])

-- set up treesitter
require("nvim-treesitter.configs").setup({
  matchup = {
    enable = true,
    disable = {},
  },
})

-- match-up options
vim.g.matchup_matchparen_offscreen = { method = "popup" }
vim.g.matchup_surround_enabled = 1
vim.g.matchup_matchparen_deferred = 1
vim.g.matchup_matchparen_hi_surround_always = 1

with the same behavior!

nvim is:

NVIM v0.10.0-dev
Build type: Release
LuaJIT 2.1.0-beta3

from vim-matchup.

unphased avatar unphased commented on June 12, 2024

You know what's crazy, I get similar errors, but what looks like a totally different set of stack traces, when I went back to a different commit (this is 6c8909b)

:mes
Failed to source `/home/slu/.local/share/nvim/lazy/playground/plugin/nvim-treesitter-playground.lua`
vim/_editor.lua:0: /home/slu/.vim/nvim/init.lua..nvim_exec2() called at /home/slu/.vim/nvim/init.lua:0../home/slu/.local/share/nvim/lazy/vim-matchup/plugin/matchup.vim[54]..function matchup#init[4]..<SNR>14_init_modules[6]..script /home/slu/.local/share/nvim/lazy/vim-matchup/autol
oad/matchup/loader.vim[95]..nvim_exec2() called at /home/slu/.local/share/nvim/lazy/vim-matchup/autoload/matchup/loader.vim:95../home/slu/.local/share/nvim/lazy/playground/plugin/nvim-treesitter-playground.lua: Vim(source):E5113: Error while calling lua chunk: /opt/neovim/share/nv
im/runtime/lua/vim/treesitter/query.lua:510: Overriding has-ancestor?
stack traceback:
^I[C]: in function 'error'
^I/opt/neovim/share/nvim/runtime/lua/vim/treesitter/query.lua:510: in function 'add_predicate'
^I...nvim-treesitter/lua/nvim-treesitter/query_predicates.lua:94: in main chunk
^I[C]: in function 'require'
^I.../share/nvim/lazy/nvim-treesitter/lua/nvim-treesitter.lua:8: in main chunk
^I[C]: in function 'require'
^I.../nvim/lazy/playground/lua/nvim-treesitter-playground.lua:5: in function 'init'
^I...im/lazy/playground/plugin/nvim-treesitter-playground.lua:2: in main chunk
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:438: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437>
^I...
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:364: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:304: in function '_load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:180: in function 'load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:115: in function 'startup'
^I...e/slu/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:85: in function 'setup'
^I/home/slu/.vim/nvim/init.lua:69: in main chunk
# stacktrace:
  - vim/_editor.lua:0 _in_ **cmd**
  - /vim-matchup/lua/treesitter-matchup.lua:1
  - uaeval():1
  - vim/_editor.lua:0 _in_ **cmd**
  - init.lua:69
vim/_editor.lua:0: /home/slu/.vim/nvim/init.lua..nvim_exec2() called at /home/slu/.vim/nvim/init.lua:0../home/slu/.local/share/nvim/lazy/vim-matchup/plugin/matchup.vim[54]..function matchup#init[4]..<SNR>14_init_modules[6]..script /home/slu/.local/share/nvim/lazy/vim-matchup/autol
oad/matchup/loader.vim[95]..nvim_exec2() called at /home/slu/.local/share/nvim/lazy/vim-matchup/autoload/matchup/loader.vim:95../home/slu/.local/share/nvim/lazy/nvim-ts-context-commentstring/plugin/ts_context_commentstring.vim, line 1: Vim(lua):E5108: Error executing lua [string "
:lua"]:1: attempt to index a boolean value
stack traceback:
^I[string ":lua"]:1: in main chunk
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:438: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:364: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:304: in function '_load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:180: in function 'load'
^I...
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:364: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:304: in function '_load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:180: in function 'load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:115: in function 'startup'
^I...e/slu/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:85: in function 'setup'
^I/home/slu/.vim/nvim/init.lua:69: in main chunk
# stacktrace:
  - vim/_editor.lua:0 _in_ **cmd**
  - /vim-matchup/lua/treesitter-matchup.lua:1
  - uaeval():1
  - vim/_editor.lua:0 _in_ **cmd**
  - init.lua:69
Failed to source `/home/slu/.local/share/nvim/lazy/nvim-treesitter/plugin/nvim-treesitter.lua`
vim/_editor.lua:0: /home/slu/.vim/nvim/init.lua..nvim_exec2() called at /home/slu/.vim/nvim/init.lua:0../home/slu/.local/share/nvim/lazy/vim-matchup/plugin/matchup.vim[54]..function matchup#init[4]..<SNR>14_init_modules[6]..script /home/slu/.local/share/nvim/lazy/vim-matchup/autol
oad/matchup/loader.vim[95]..nvim_exec2() called at /home/slu/.local/share/nvim/lazy/vim-matchup/autoload/matchup/loader.vim:95../home/slu/.local/share/nvim/lazy/nvim-treesitter/plugin/nvim-treesitter.lua: Vim(source):E5113: Error while calling lua chunk: ...are/nvim/lazy/nvim-tree
sitter/plugin/nvim-treesitter.lua:9: loop or previous error loading module 'nvim-treesitter'
stack traceback:
^I[C]: in function 'require'
^I...are/nvim/lazy/nvim-treesitter/plugin/nvim-treesitter.lua:9: in main chunk
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:438: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:364: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:304: in function '_load'
^I...
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'

Super curious, here, the errors come up on startup but matchup seems to continue working beyond that. and moving around or hitting keys bound to matchup does not seem to cause any more errors.

from vim-matchup.

unphased avatar unphased commented on June 12, 2024

OK i think this might not be specific to this plugin. something about recent changes between nvim, lazy, lua syntax, and possibly ubuntu 22.04 and WSL2 here.

from vim-matchup.

andymass avatar andymass commented on June 12, 2024

can you let me know if commenting out specific queries in the query files (after/queries) fixes it?

I can't reproduce it for some reason.

from vim-matchup.

Martinits avatar Martinits commented on June 12, 2024

I met this problem, too. But only in lua files. Removing after/queries/lua fixs that.

from vim-matchup.

ravitemer avatar ravitemer commented on June 12, 2024

Same here. It is throwing this error only for lua files.

Error detected while processing CursorMoved Autocommands for "*"..function 3[3]..4[71]..matchup#delim#get_current
[1]..<SNR>48_get_delim_multi[3]..matchup#ts_engine#get_delim[3]..<SNR>45_forward:
line    1:
E5108: Error executing lua ...im/0.9.0/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node t
ype at position 6 for language lua
stack traceback:
        [C]: in function '_ts_parse_query'
        ...im/0.9.0/share/nvim/runtime/lua/vim/treesitter/query.lua:259: in function 'get_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:55: in function 'get_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:142: in function 'prepare_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:339: in function 'iter_group_results'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:351: in function 'collect_group_results'
        ...lazy/opt/vim-matchup/lua/treesitter-matchup/internal.lua:46: in function 'fn'
        ...0/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:324: in function 'for_each_tree'
        ...lazy/opt/vim-matchup/lua/treesitter-matchup/internal.lua:40: in function 'fn'

from vim-matchup.

unphased avatar unphased commented on June 12, 2024

Thanks for the comments. @Martinits and @ravitemer are you both on Ubuntu in WSL2?

@andymass i definitely cannot reproduce this in any form from my Mac, my Linux box will be back up in a little bit

from vim-matchup.

andymass avatar andymass commented on June 12, 2024

I met this problem, too. But only in lua files. Removing after/queries/lua fixs that.

Can anyone try removing specific queries from after/queries/lua/matchup.scm until it works?

from vim-matchup.

Martinits avatar Martinits commented on June 12, 2024

I'm on archlinux. After some trying, commenting out the first line ; inherits: quote fixs the problem. And in after/queries/quote/matchup.scm, commenting out both two queries (or blocks? I don't understand scheme) fixs this.

from vim-matchup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.