Giter VIP home page Giter VIP logo

Comments (8)

GR3YH4TT3R93 avatar GR3YH4TT3R93 commented on September 26, 2024 2

This is the exact error that occurs when using Dashboard to navigate to new file that only occurs when updating to the specified commit.

It has something to do with the command that they're working on.

 îȘ‡  Error  08:49:11 msg_show.lua_error E5108: Error executing lua: vim/_editor.lua:341: nvim_exec2()..BufReadPost Autocommands for "*": Vim(append):Error executing lua callback: ...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24: Error executing lua: ...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:25: nvim_exec2()..BufReadPost Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error executing lua callback: vim/keymap.lua:36: rhs: expected string|function, got nil
stack traceback:
	[C]: in function 'error'
	vim/shared.lua:764: in function 'validate'
	vim/keymap.lua:36: in function 'set'
	...treesitter/lua/nvim-treesitter/incremental_selection.lua:151: in function 'attach'
	...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:509: in function 'attach_module'
	...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:532: in function 'reattach_module'
	...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:133: in function <...vim/lazy/nvim-treesitter/lua/nvim-treesitter/configs.lua:132>
	[C]: in function 'nvim_cmd'
	...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:25: in function <...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24>
	[C]: in function 'nvim_buf_call'
	...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24: in function <...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:10>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:341: in function 'cmd'
	...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:299: in function <...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:280>
stack traceback:
	[C]: in function 'nvim_cmd'
	...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:25: in function <...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24>
	[C]: in function 'nvim_buf_call'
	...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24: in function <...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:10>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:341: in function 'cmd'
	...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:299: in function <...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:280>
stack traceback:
	[C]: in function 'nvim_buf_call'
	...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:24: in function <...ata/com.termux/files/usr/share/nvim/runtime/filetype.lua:10>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:341: in function 'cmd'
	...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:299: in function <...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:280>
stack traceback:
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:341: in function 'cmd'
	...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:299: in function <...e/nvim/lazy/dashboard-nvim/lua/dashboard/theme/hyper.lua:280>

from nvim-treesitter.

wookayin avatar wookayin commented on September 26, 2024 2

I've changed the title to be more informative. /cc @MariaSolOs

from nvim-treesitter.

MariaSolOs avatar MariaSolOs commented on September 26, 2024 2

Oops my bad... removing that fixed the error! Thanks!!!

No worries! I'm glad we fixed it :) To be fair it's quite odd for scope_incremental to exist but not scope_decremental. Oh well...

from nvim-treesitter.

GR3YH4TT3R93 avatar GR3YH4TT3R93 commented on September 26, 2024 1

Here's the the minimal config and steps to reproduce:

1.) Open with minimal config (eg. nvim -u repro.lua)
2.) Allow downloads to complete
3.) Close and reopen with file (eg. nvim repro.lua -u repro.lua)
4.) Error will appear

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  -- do not remove the colorscheme!
  "folke/tokyonight.nvim",
  -- add any other pugins here
  {
    -- Highlight, edit, and navigate code
    "nvim-treesitter/nvim-treesitter",
    config = function()
      local configs = require("nvim-treesitter.configs")
      configs.setup({
        ensure_installed = {},
        auto_install = true,
        sync_install = false,
        ignore_install = {},
        modules = {},
        incremental_selection = {
          enable = true,
          keymaps = {
            init_selection = "<leader>ss",
            node_incremental = "<leader>nn",
            node_decremental = "<leader>np",
            scope_incremental = "<leader>sn",
            scope_dencremental = "<leader>sp",
          },
        },
      })
    end,
    build = ":TSUpdate",
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])

from nvim-treesitter.

MariaSolOs avatar MariaSolOs commented on September 26, 2024 1

@GR3YH4TT3R93 the error is correct. There's no scope_decremental mapping. The available functions are here:

local FUNCTION_DESCRIPTIONS = {
init_selection = "Start selecting nodes with nvim-treesitter",
node_incremental = "Increment selection to named node",
scope_incremental = "Increment selection to surrounding scope",
node_decremental = "Shrink selection to previous named node",
}

There was no error before because the command would still receive a string during creation, but the binding would be incorrect during execution.

@clason please correct me if I'm wrong here.

from nvim-treesitter.

GR3YH4TT3R93 avatar GR3YH4TT3R93 commented on September 26, 2024 1

Oops my bad... removing that fixed the error! Thanks!!!

from nvim-treesitter.

lucario387 avatar lucario387 commented on September 26, 2024

Doesn't seem related. Both of them doesn't change any queries though?

from nvim-treesitter.

MariaSolOs avatar MariaSolOs commented on September 26, 2024

Interesting. @GR3YH4TT3R93 could you please provide a minimal configuration? Else it would also be really helpful if you navigate to that incremental_selection file and print what funcname is here.

from nvim-treesitter.

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.