deprecate: input.prompt_buffer option

Even once the fixes to the prompt buffer come out in the next version of
Neovim, I'm really not sure what advantages we get from using the prompt
buffer. And we will continue to have disadvantages because it does *not*
function like a normal buffer. If anyone is using it and has a good
reason for it, please let me know. Otherwise, I'll be removing that
functionality in a later commit so I don't have to support two
implementations.
This commit is contained in:
Steven Arcangeli 2021-12-17 12:31:32 -08:00
parent 0ab6681748
commit 9b8c2be345
4 changed files with 10 additions and 9 deletions

View File

@ -138,9 +138,6 @@ require('dressing').setup({
-- Window transparency (0-100)
winblend = 10,
-- see :help dressing-prompt
prompt_buffer = false,
-- see :help dressing_get_config
get_config = nil,
},

View File

@ -28,9 +28,6 @@ Configure dressing.nvim by calling the setup() function.
-- Window transparency (0-100)
winblend = 10,
-- see :help dressing-prompt
prompt_buffer = false,
-- see :help dressing_get_config
get_config = nil,
},

View File

@ -21,9 +21,6 @@ local default_config = {
-- Window transparency (0-100)
winblend = 10,
-- see :help dressing-prompt
prompt_buffer = false,
-- see :help dressing_get_config
get_config = nil,
},

View File

@ -4,6 +4,16 @@ local M = {}
M.setup = function(opts)
config.update(opts)
-- Wait until vim has fully started up before we show deprecation warnings
vim.defer_fn(function()
if config.input.prompt_buffer then
vim.notify(
"dressing.nvim option 'input.prompt_buffer = true' is deprecated and will be removed in a future version. If you want it to continue to be supported please file an issue with your use case: https://github.com/stevearc/dressing.nvim/issues/new",
vim.log.levels.WARN,
{}
)
end
end, 100)
end
local original_input