Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] option to disable titles #133

Closed
sand4rt opened this issue Jan 6, 2024 · 2 comments
Closed

[Question] option to disable titles #133

sand4rt opened this issue Jan 6, 2024 · 2 comments

Comments

@sand4rt
Copy link

sand4rt commented Jan 6, 2024

Thanks for the awesome plugin!

Do you know if there is an option to disable all the titles? In this case "New Name:":
Screenshot 2024-01-07 at 00 58 22

@stevearc
Copy link
Owner

stevearc commented Jan 7, 2024

There is no way to disable the titles. Part of the interface for vim.ui.input is providing prompt text, so the plugin author or whoever is calling vim.ui.input is assuming that you will be able to read the prompt. In some cases maybe it isn't important, but we can't make the assumption that it's never important. As far as I'm concerned, displaying the prompt is part of the API contract for vim.ui.input.

@stevearc stevearc closed this as completed Jan 7, 2024
@sand4rt
Copy link
Author

sand4rt commented Feb 11, 2024

I ended up using:

-- LazyVim config
return {
	"stevearc/dressing.nvim",
	event = "VeryLazy",
	config = function()
		require("dressing").setup({
			input = {
				border = "single",
			},
			select = {
				enabled = false,
			},
		})
		local input = vim.ui.input
		vim.ui.input = function(opts, on_confirm)
			opts.prompt = ""
			input(opts, on_confirm)
		end
	end,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants