nvim-type-fmt icon indicating copy to clipboard operation
nvim-type-fmt copied to clipboard

error with vtsls: Chunk is not an array with one or two strings

Open llllvvuu opened this issue 2 years ago • 2 comments

To reproduce: go to a line and press A then enter

Error executing vim.schedule lua callback: vim/_editor.lua:0: Chunk is not an array with one or two strings
stack traceback:
        [C]: in function 'nvim_echo'
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

llllvvuu avatar Oct 09 '23 12:10 llllvvuu

Have no idea about this, there is no helpful information in the stack trace. Also, I cannot reproduce this with the following minimal config on the nightly:


local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
	{
		"neovim/nvim-lspconfig",
		config = function()
			require("lspconfig").vtsls.setup({})
		end,
	},
	{
		"yioneko/nvim-type-fmt",
	},
}, {})

Could you provide with more information for this?

yioneko avatar Oct 10 '23 13:10 yioneko

This error happens when you pass something besides a string to vim.notify, like so: https://github.com/yioneko/nvim-type-fmt/blob/main/lua/type-fmt.lua#L65

(Just passing through as I was debugging my own Neovim plugin, leaving a note for the next dev who has to debug this error message in their code.)

mike-burns avatar Oct 06 '24 20:10 mike-burns