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

Prompt prefix highlight not restored when deleting entire line #2616

Closed
Subjective opened this issue Jul 22, 2023 · 2 comments · Fixed by #2739
Closed

Prompt prefix highlight not restored when deleting entire line #2616

Subjective opened this issue Jul 22, 2023 · 2 comments · Fixed by #2739
Labels
bug Something isn't working reproducible Bug that can be reproduced.

Comments

@Subjective
Copy link

Description

As mentioned in the title, custom highlight colors for the prompt prefix are not restored when doing dd or cc in the the telescope prompt.

Screen Recording 2023-07-22 at 1 41 20 AM

Neovim version

NVIM v0.10.0-dev-695+g58f948614
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Operating system and version

macOS 13.4

Telescope version / branch / rev

telescope 0.1.2

checkhealth telescope

telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.6.0

===== Installed extensions ===== ~

Telescope Extension: `aerial` ~
- No healthcheck provided

Telescope Extension: `file_browser` ~
- No healthcheck provided

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `neoclip` ~
- No healthcheck provided

Telescope Extension: `notify` ~
- No healthcheck provided

Telescope Extension: `projects` ~
- No healthcheck provided

Telescope Extension: `undo` ~
- No healthcheck provided

Steps to reproduce

  1. nvim -nu minimal.lua
  2. :Telescope
  3. Hit cc or dd after typing something into the prompt
  4. Prompt prefix highlight color is not restored

Expected behavior

For the highlight to be applied when doing dd or cc.

Actual behavior

The fg color is reset

Minimal config

vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
	require("packer").startup({
		{
			"wbthomason/packer.nvim",
			{
				"nvim-telescope/telescope.nvim",
				requires = {
					"nvim-lua/plenary.nvim",
					{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
				},
			},
			{ "catppuccin/nvim", as = "catppuccin" },
			-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
		},
		config = {
			package_root = package_root,
			compile_path = install_path .. "/plugin/packer_compiled.lua",
			display = { non_interactive = true },
		},
	})
end
_G.load_config = function()
	vim.cmd.colorscheme("catppuccin")
	require("telescope").setup()
	require("telescope").load_extension("fzf")
	-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
	vim.api.nvim_set_hl(0, "TelescopePromptPrefix", { fg = "#ff2f87", bg = "#ff2f87", bold = true, nocombine = true })
	vim.api.nvim_set_hl(0, "TelescopeSelectionCaret", { fg = "#ff2f87", bg = "#ff2f87", bold = true, nocombine = true })
end
if vim.fn.isdirectory(install_path) == 0 then
	print("Installing Telescope and dependencies.")
	vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]])
@Subjective Subjective added the bug Something isn't working label Jul 22, 2023
@jamestrew jamestrew added the reproducible Bug that can be reproduced. label Jul 22, 2023
@jamestrew
Copy link
Contributor

Thanks for reporting -- I can replicate this.
I think this is fairly low priority so I can't guarantee a fix anytime soon.

@Conni2461
Copy link
Member

#2739 should fix your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproducible Bug that can be reproduced.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants