Closed Lalit64 closed 2 years ago
Hmmmm. That is odd. Telescope should look like the pic in the Readme. Could you share your config and run :hi TelescopeResultsTitle
and share the output.
Config is at https://gitHub.com/lalit64/HydroVim ignore the readme it's under construction. I just need to push the latest changes. Can I talk to you and push the changes tomorrow I am the SAST time zone and it's pretty late for me now. I have school tomorrow so I have to go to bed.
No problem. I'm on holiday at the moment on Pacific Time so will check later on for any updates
No problem. I'm on holiday at the moment on Pacific Time so will check later on for any updates
I have pushed the changes. Check them out. Also my iTerm2 background color is #232832;
Can't see anything obvious...
Can you run :hi TelescopeResultsTitle
and let me know the output?
EDIT: Actually, I think it may be because you've overriden the bg
colour. You may need to specify a custom TeleacopeResultsTitle
and TelescopePromptTitle
How about the cmp. Output for :hi TelescopeResultsTitle
is above
Something is overriding onedarkpro's default telescope theme. If you view the Telescope plugin theme file here, you should see that it shouldn't link to any highlight group. I advise that you check your config and see what's causing it.
Regarding cmp, it should be the Pmenu
highlights that affect it. Have you tried PmenuSbar
?
@olimorris Should I be targeting the PmenuSbar bg or fg?
Edit: Neither of these work.
Can you run the :hi
command for all Pmenu
groups and confirm if the hex codes match the colors when you use cmp?
The theme only applies icon highlights to cmp. You could try changing Pmenu
fg and bg highlight groups to #FF0000
and seeing if that is visible in your setup. If not, something is probably overwriting them.
Edit: Now I have access to my Mac...
PmenuSel
updates the background for a selected item in cmp:
Pmenu
updates the menu background in cmp:
Assuming you've not changed the default cmp config, you can see it sets Pmenu
and PmenuSel
in the default config here.
I do have a custom CMP config but that shouldn't change anything.
Take a look at it below.
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
require("luasnip.loaders.from_vscode").load()
local cmp = require("cmp")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
cmp_autopairs.lisp[#cmp_autopairs.lisp + 1] = "racket"
local kind_icons = {
Text = "οΎ",
Method = "ο¦",
Function = "ο",
Constructor = "ο₯",
Field = "ο° ",
Variable = "οͺ",
Class = "ο ",
Interface = "ο¨",
Module = "ο",
Property = "ο",
Unit = "ξ",
Value = "ο’",
Enum = "ο
",
Keyword = "ο ",
Snippet = "ο",
Color = "ο£",
File = "ο",
Reference = "ο",
Folder = "ο",
EnumMember = "ο
",
Constant = "ο£Ύ",
Struct = "Χ€ΦΌ",
Event = "ο§",
Operator = "ο",
TypeParameter = "ο",
}
local mapping = {
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-e>"] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
["<CR>"] = cmp.mapping({
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
c = function(fallback)
if cmp.visible() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })
else
fallback()
end
end,
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), { "i", "c" }),
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), { "i", "c" }),
}
cmp.setup({
completion = { comp232832leteopt = "menu,menuone,noinsert" },
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = mapping,
sources = {
{ name = "nvim_lsp" },
{ name = "buffer", keyword_length = 2 },
{ name = "luasnip" },
{ name = "path", max_item_count = 10 },
},
formatting = {
format = function(entry, vim_item)
-- Kind icons
vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind)
-- Source
-- vim_item.menu = ({
-- buffer = "[Buffer]",
-- nvim_lsp = "[LSP]",
-- luasnip = "[LuaSnip]",
-- path = "[Path]",
-- })[entry.source.name]
return vim_item
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
},
})
Edit: I re-wrote my config to make it neater and more readable but I still seems to have the same issues. I made sure to read every line and I can't seem to find the issue
Edit 2: It's still at the same repository. No README though.
I can't really help you beyond this unfortunately. To close this out Is recommend the below approach:
Pmenu
and PmenuSel
highlight groups to an fg and bg of #FF0000
. You can see how to do this in the Readme of the plugin.:hi Pmenu
and see what the color is. This will indicate another plugin is changing the highlight for Pmenu.Alternatively, create a minimal config of just onedarkpro and cmp and see if that solves it.
I have made a minimal config and it seems to be working now. I'm not sure what the issue is in my config.
Edit: I have found the issue π! It seems to be nvim-cmp when using
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered()
Edit 2: Opened an issue in nvim-cmp repository.
I have made a minimal config and it seems to be working now. I'm not sure what the issue is in my config.
Edit: I have found the issue π! It seems to be nvim-cmp when using
completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered()
Edit 2: Opened an issue in nvim-cmp repository.
Hi! I have run into the same problem when using those same window options. Has your issue been resolved yet upstream? Could you post a link to the solution/ongoing discussion?
Hey @olimorris, I can't seem to find the hlgroup for nvim-cmp selected item. I have tried PmenuSel but it doesn't seem to work. This also applies to telescope or any popup menu/float. I get this very light color. β
I also only noticed now that the Telescope title is very light. Any way to fix these ?