TelescopePromptTitle and TelescopePromptBorder point to TelescopeTitle and TelescopeBorder
neilord opened this issue · 2 comments
neilord commented
Description
Those 2 highlight groups have constant colors instead of pointing to 'parent' groups:
TelescopePromptTitle
TelescopePromptBorder
Please change them to point to TelescopeTitle
and TelescopeBorder
Neovim version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
Operating system and version
macOS
Telescope version / branch / rev
telescope 0.1.6
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 14.1.0
- OK fd: found fd 8.7.1
===== Installed extensions ===== ~
Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured
Steps to reproduce
$nvim
(just run nvim)
Expected behavior
TelescopePromptTitle
and TelescopePromptBorder
point to TelescopeTitle
and TelescopeBorder
.
Actual behavior
TelescopePromptTitle
and TelescopePromptBorder
do not point to TelescopeTitle
and TelescopeBorder
.
Minimal config
local find_files = function()
local builtin = require('telescope.builtin')
local utils = require('telescope.utils')
local is_git_repo = utils.get_os_command_output({
'git',
'rev-parse',
'--is-inside-work-tree'
})[1] == 'true'
if is_git_repo then
builtin.git_files()
else
builtin.find_files()
end
end
return {
'nvim-telescope/telescope.nvim',
init = function()
vim.api.nvim_set_hl(0, 'TelescopePromptPrefix', { link = 'TelescopePromptBorder' })
local telescope = require('telescope')
telescope.setup({
defaults = {
prompt_prefix = ' ',
selection_caret = " ",
winblend = 20,
sorting_strategy = "ascending",
layout_strategy = "vertical",
layout_config = {
width = 100,
height = 0.80,
preview_cutoff = 40,
prompt_position = "top",
},
path_display = 'smart',
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
},
},
})
vim.api.nvim_create_autocmd('VimEnter', {
callback = function()
vim.cmd([[
hi TelescopeBorder guibg=#1e1e29
hi TelescopeNormal guibg=#1e1e29
hi TelescopePromptTitle guibg=#1e1e29
hi TelescopePromptBorder guibg=#1e1e29
]])
end
})
end,
keys = {
{ '<leader>ff', find_files },
{ '<leader>fF', '<cmd>Telescope find_files<CR>' },
{ '<leader>fo', '<cmd>Telescope oldfiles<CR>' },
{ '<leader>fs', '<cmd>Telescope grep_string<CR>', mode = {'n', 'v'}},
{ '<leader>ft', '<cmd>Telescope live_grep<CR>', mode = {'n', 'v'}},
{ '<leader>sh', '<cmd>Telescope highlights<CR>' },
},
dependencies = {
'nvim-tree/nvim-web-devicons',
'nvim-lua/plenary.nvim',
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
config = function()
require("telescope").load_extension("fzf")
end,
},
},
}
jamestrew commented
I'm pretty sure we do this already if by parent, you parent, you mean link.
telescope.nvim/plugin/telescope.lua
Lines 28 to 36 in fac83a5