Error executing vim.schedule lua callback: ...ions.nvim/lua/clangd_extensions/switch_source_header.lua:3: Expected 3 arguments
stack traceback:
[C]: in function 'nvim_echo'
...ions.nvim/lua/clangd_extensions/switch_source_header.lua:3: in function 'handler'
...w/Cellar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp.lua:1393: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
NVIM version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1710088188
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"
Run :checkhealth for more info
Problematic Part
local function handler(_err, uri)
if not uri or uri == "" then
vim.api.nvim_echo("Corresponding file cannot be determined", false) -- ***[1]*** throw Error!
-- ...
end
vim.api.nvim_echo expects three arguments, but only two are provided.
Proposal
local function handler(_err, uri)
if not uri or uri == "" then
vim.api.nvim_echo({ { "Corresponding file cannot be determined" } }, false, {}) -- ***[1]*** changed line
-- ...
Error Message
NVIM version
Problematic Part
vim.api.nvim_echo
expects three arguments, but only two are provided.Proposal
This change will make it work as intended.