Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

[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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants