feat: separate higlight for titles in picker windows (#1362)

- requires nvim-lua/plenary.nvim#260
This commit is contained in:
Luke Kershaw
2021-10-26 15:14:33 +01:00
committed by GitHub
parent 782d802d44
commit 5809321290
2 changed files with 11 additions and 0 deletions

View File

@@ -308,13 +308,16 @@ function Picker:find()
popup_opts.results.minheight = popup_opts.results.height
popup_opts.results.highlight = "TelescopeNormal"
popup_opts.results.borderhighlight = "TelescopeResultsBorder"
popup_opts.results.titlehighlight = "TelescopeResultsTitle"
popup_opts.prompt.minheight = popup_opts.prompt.height
popup_opts.prompt.highlight = "TelescopeNormal"
popup_opts.prompt.borderhighlight = "TelescopePromptBorder"
popup_opts.prompt.titlehighlight = "TelescopePromptTitle"
if popup_opts.preview then
popup_opts.preview.minheight = popup_opts.preview.height
popup_opts.preview.highlight = "TelescopeNormal"
popup_opts.preview.borderhighlight = "TelescopePreviewBorder"
popup_opts.preview.titlehighlight = "TelescopePreviewTitle"
end
-- local results_win, results_opts = popup.create("", popup_opts.results)

View File

@@ -27,6 +27,14 @@ highlight default link TelescopePromptBorder TelescopeBorder
highlight default link TelescopeResultsBorder TelescopeBorder
highlight default link TelescopePreviewBorder TelescopeBorder
" Title highlight groups.
" Use TelescopeTitle to override the default.
" Otherwise set them specifically
highlight default link TelescopeTitle TelescopeBorder
highlight default link TelescopePromptTitle TelescopeTitle
highlight default link TelescopeResultsTitle TelescopeTitle
highlight default link TelescopePreviewTitle TelescopeTitle
" Used for highlighting characters that you match.
highlight default link TelescopeMatching Special