nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects

Plugin breaks on windows/arm64 neovim with LazyVim

Open
#725 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Tree-sitter Query
Stars
2.8k
Forks
271
Avg merge
8d 8h
Merged PRs (30d)
1

Description

Describe the bug
I built a windows/arm64 Neovim which use the MSVC arm64 build tools, and installed LazyVim.
On startup, it strikes me an error message:

Failed to source `C:/Users/ares/AppData/Local/nvim-data/lazy/nvim-treesitter-textobjects/plugin/nvim-treesitter-textobjects.vim`

vim/_editor.lua:439: User Autocommands for "VeryLazy"..script nvim_exec2() called at User Autocommands for "VeryLazy":0..C:/Users/ares/AppData/Local/nvim-data/lazy/nvim-treesitter-textobjects/plugin/nvim-treesitter-textobjects.vim, line 3: Vim(lua):E5108: Error executing lua C:/Program Files/Neovim/share/nvim/runtime/lua/vim/iter.lua:236: flatten() requires a list-like table
stack traceback:
	[C]: in function 'error'
	C:/Program Files/Neovim/share/nvim/runtime/lua/vim/iter.lua:236: in function 'flatten'
	...data/lazy/nvim-treesitter/lua/nvim-treesitter/compat.lua:33: in function 'flatten'
	...-data/lazy/nvim-treesitter/lua/nvim-treesitter/utils.lua:86: in function 'setup_commands'
	...eesitter-textobjects/lua/nvim-treesitter-textobjects.lua:70: in function 'init'
	[string ":lua"]:1: in main chunk
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:439: in function 'cmd'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:510: in function <.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:509>
	[C]: in function 'xpcall'
	...ta/Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/util.lua:135: in function 'try'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:509: in function 'source'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:457: in function 'source_runtime'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:425: in function 'packadd'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:359: in function '_load'
	.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:197: in function 'load'
	...nvim-data/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:85: in function <...nvim-data/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:72>
	[C]: in function 'nvim_exec_autocmds'
	...ta/Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/util.lua:175: in function <...ta/Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/util.lua:169>

# stacktrace:
  - vim\_editor.lua:439 _in_ **cmd**

FYI, windows/amd64 Neovim doesn't have this issue. So I'm wondering there may have some quirks with lua.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the startup failure on Windows/ARM64 Neovim with LazyVim, then compare it with the working Windows/AMD64 setup. Start at runtime/lua/vim/iter.lua:236 and trace through nvim-treesitter/lua/nvim-treesitter/compat.lua:33, utils.lua:86, and nvim-treesitter-textobjects.lua:70. Done means the ARM64 startup no longer produces the reported flatten() error.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.