refactor(api): deprecate nvim_notify #31938

Problem:
The `nvim_notify` API (note: unrelated to `vim.notify()` Lua API) was
not given any real motivation in https://github.com/neovim/neovim/pull/13843

There are, and were, idiomatic and ergonomic alternatives already.

Solution:
Deprecate `nvim_notify`.
This commit is contained in:
Justin M. Keyes
2025-01-10 11:42:04 -08:00
committed by GitHub
parent b06f42b502
commit 0717dfbfaf
7 changed files with 47 additions and 51 deletions

View File

@@ -781,18 +781,6 @@ describe('API', function()
end)
end)
describe('nvim_notify', function()
it('can notify a info message', function()
api.nvim_notify('hello world', 2, {})
end)
it('can be overridden', function()
command('lua vim.notify = function(...) return 42 end')
eq(42, api.nvim_exec_lua("return vim.notify('Hello world')", {}))
api.nvim_notify('hello world', 4, {})
end)
end)
describe('nvim_input', function()
it('Vimscript error: does NOT fail, updates v:errmsg', function()
local status, _ = pcall(api.nvim_input, ':call bogus_fn()<CR>')