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

fix: add space after prompt to look nicer #136

Merged
merged 1 commit into from
Jan 14, 2024
Merged

fix: add space after prompt to look nicer #136

merged 1 commit into from
Jan 14, 2024

Conversation

231tr0n
Copy link
Contributor

@231tr0n 231tr0n commented Jan 14, 2024

add space after prompt for fzf backend to look good

Context

Using fzf as backend, without this extra space, the prompt gets mixed with the ones we are typing making it unable to read like in the below screenshot
image
Even after disabling trim_prompts it looks like this which is little bit unclear to read
image

Description

It adds an extra space to the prompt making it look cleaner and seperates the input from prompt making it readable like in the screenshot below

Without trim prompts enabled
image
With trim prompts enabled
image

Test Plan

bootstrap_paq({
  	{
		"junegunn/fzf",
		build = ":call fzf#install()",
	},
	"junegunn/fzf.vim",
	"nomnivore/ollama.nvim",
	"stevearc/dressing.nvim",
})

require("ollama").setup({
	model = "codellama",
	url = "http://127.0.0.1:11434",
	-- serve = {
	--	on_start = false,
	--	command = "ollama",
	--	args = { "serve" },
	--	stop_command = "pkill",
	--	stop_args = { "-SIGTERM", "ollama" },
	-- },
	prompts = {
		Sample_Prompt = {
			prompt = "This is a sample prompt that receives $input and $sel(ection), among others.",
			input_label = "> ",
			model = "codellama",
			action = "display",
		},
	},
})

require("dressing").setup({
	select = {
		backend = { "fzf", "nui", "builtin" },
		trim_prompt = false,
	},
})

@stevearc
Copy link
Owner

Thanks for the PR!

@stevearc stevearc merged commit 44a3638 into stevearc:master Jan 14, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants