nvim-type-fmt
nvim-type-fmt copied to clipboard
error with vtsls: Chunk is not an array with one or two strings
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>
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?
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.)