|
1 | | -local function callback() |
| 1 | +local function callback(opts) |
| 2 | + local title = { |
| 3 | + fg = (opts.title_invert and C.ui.float) or C.ui.title, |
| 4 | + bg = (opts.title_invert and C.ui.title) |
| 5 | + or (opts.inactive and C.ui.base) |
| 6 | + or (opts.transparent and opts.float and C.ui.base) |
| 7 | + or (opts.float and C.ui.float) |
| 8 | + or (opts.transparent and C.none) |
| 9 | + or C.ui.base, |
| 10 | + blend = vim.o.winblend or 0, |
| 11 | + bold = true, |
| 12 | + } |
| 13 | + |
| 14 | + local normal = { |
| 15 | + fg = C.ui.text, |
| 16 | + bg = (opts.inactive and C.ui.base) |
| 17 | + or (opts.transparent and opts.float and C.ui.base) |
| 18 | + or (opts.float and C.ui.float) |
| 19 | + or (opts.transparent and C.none) |
| 20 | + or C.ui.base, |
| 21 | + blend = vim.o.winblend or 0, |
| 22 | + } |
| 23 | + |
| 24 | + local border = { |
| 25 | + fg = (opts.border and C.ui.border) or (opts.inactive and C.ui.base) or (opts.float and C.ui.float) or C.ui.base, |
| 26 | + bg = (opts.border and opts.inactive and C.ui.base) |
| 27 | + or (opts.transparent and opts.float and C.ui.base) |
| 28 | + or (opts.float and C.ui.float) |
| 29 | + or (opts.transparent and C.none) |
| 30 | + or C.ui.base, |
| 31 | + blend = vim.o.winblend or 0, |
| 32 | + } |
| 33 | + |
2 | 34 | return { |
3 | 35 | ---------------- |
4 | 36 | --- Title |
5 | 37 | ---------------- |
6 | | - TelescopeTitle = { link = "PopupTitle" }, |
7 | | - TelescopeResultsTitle = { link = "TelescopeTitle" }, |
8 | | - TelescopePromptTitle = { link = "TelescopeTitle" }, |
9 | | - TelescopePreviewTitle = { link = "TelescopeTitle" }, |
| 38 | + |
| 39 | + TelescopePromptTitle = { |
| 40 | + fg = (opts.title_invert and C.ui.float) or C.ui.title, |
| 41 | + bg = (opts.title_invert and C.ui.title) |
| 42 | + or (opts.float and C.ui.prompt) |
| 43 | + or (opts.transparent and C.none) |
| 44 | + or C.ui.base, |
| 45 | + blend = vim.o.winblend or 0, |
| 46 | + bold = true, |
| 47 | + }, |
| 48 | + TelescopeResultsTitle = title, |
| 49 | + TelescopePreviewTitle = title, |
| 50 | + |
| 51 | + -- TelescopeTitle = { link = "FloatTitle" }, |
| 52 | + -- TelescopePromptTitle = { link = "TelescopeTitle" }, |
| 53 | + -- TelescopeResultsTitle = { link = "TelescopeTitle" }, |
| 54 | + -- TelescopePreviewTitle = { link = "TelescopeTitle" }, |
10 | 55 |
|
11 | 56 | ---------------- |
12 | 57 | --- Normal |
13 | 58 | ---------------- |
14 | | - TelescopeNormal = { link = "NormalPopup" }, |
15 | | - TelescopePreviewNormal = { link = "TelescopeNormal" }, |
16 | | - TelescopePromptNormal = { link = "TelescopeNormal" }, |
17 | | - TelescopeResultsNormal = { link = "TelescopeNormal" }, |
| 59 | + |
| 60 | + TelescopePromptNormal = { |
| 61 | + fg = C.ui.text, |
| 62 | + bg = (opts.border and opts.inactive and C.ui.base) |
| 63 | + or (opts.border and opts.float and C.ui.base) |
| 64 | + or (opts.inactive and C.ui.prompt) |
| 65 | + or (opts.float and C.ui.prompt) |
| 66 | + or (opts.transparent and C.none) |
| 67 | + or C.ui.base, |
| 68 | + blend = vim.o.winblend or 0, |
| 69 | + }, |
| 70 | + TelescopeResultsNormal = normal, |
| 71 | + TelescopePreviewNormal = normal, |
| 72 | + |
| 73 | + -- TelescopeNormal = { link = "NormalFloat" }, |
| 74 | + -- TelescopePromptNormal = { link = "TelescopeNormal" }, |
| 75 | + -- TelescopeResultsNormal = { link = "TelescopeNormal" }, |
| 76 | + -- TelescopePreviewNormal = { link = "TelescopeNormal" }, |
18 | 77 |
|
19 | 78 | ---------------- |
20 | 79 | --- Border |
21 | 80 | ---------------- |
22 | | - TelescopeBorder = { link = "PopupBorder" }, |
23 | | - TelescopeResultsBorder = { link = "TelescopeBorder" }, |
24 | | - TelescopePromptBorder = { link = "TelescopeBorder" }, |
25 | | - TelescopePreviewBorder = { link = "TelescopeBorder" }, |
| 81 | + |
| 82 | + TelescopePromptBorder = { |
| 83 | + fg = (opts.border and C.ui.border) or (opts.inactive and C.ui.base) or (opts.float and C.ui.prompt) or C.ui.base, |
| 84 | + bg = (opts.border and opts.inactive and C.ui.base) or (opts.float and C.ui.prompt) or C.ui.prompt, |
| 85 | + blend = vim.o.winblend or 0, |
| 86 | + }, |
| 87 | + TelescopeResultsBorder = border, |
| 88 | + TelescopePreviewBorder = border, |
| 89 | + |
| 90 | + -- TelescopeBorder = { link = "FloatBorder" }, |
| 91 | + -- TelescopePromptBorder = { link = "TelescopeBorder" }, |
| 92 | + -- TelescopeResultsBorder = { link = "TelescopeBorder" }, |
| 93 | + -- TelescopePreviewBorder = { link = "TelescopeBorder" }, |
26 | 94 |
|
27 | 95 | ---------------- |
28 | 96 | --- Other |
29 | 97 | ---------------- |
| 98 | + |
30 | 99 | TelescopePromptPrefix = { fg = C.ui.accent }, |
31 | 100 | TelescopeSelectionCaret = { fg = C.ui.accent }, |
32 | | - TelescopeMatching = { fg = C.ui.text_match }, |
33 | | - TelescopeSelection = { bg = C.ui.current_line }, |
34 | | - -- TelescopeSelection = { fg = C.ui.base, bg = C.ui.accent, bold = true }, |
| 101 | + TelescopeMatching = { fg = C.ui.text_match, bold = true }, |
| 102 | + -- TelescopeSelection = { bg = C.ui.current_line }, |
| 103 | + TelescopeSelection = { link = "PmenuSel" }, |
35 | 104 | TelescopeMultiSelection = { fg = C.syntax.blue }, |
36 | 105 | TelescopeMultiIcon = { fg = C.ui.blue }, |
37 | 106 | } |
|
0 commit comments