Git Product home page Git Product logo

Comments (14)

Lalit64 avatar Lalit64 commented on September 26, 2024 1

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.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024 1

No problem. I'm on holiday at the moment on Pacific Time so will check later on for any updates

from onedarkpro.nvim.

Lalit64 avatar Lalit64 commented on September 26, 2024 1

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.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

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.

from onedarkpro.nvim.

Lalit64 avatar Lalit64 commented on September 26, 2024

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;

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

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

from onedarkpro.nvim.

Lalit64 avatar Lalit64 commented on September 26, 2024

Screenshot 2022-06-07 at 08 08 20

How about the cmp. Output for :hi TelescopeResultsTitle is above

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

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.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

Regarding cmp, it should be the Pmenu highlights that affect it. Have you tried PmenuSbar?

from onedarkpro.nvim.

Lalit64 avatar Lalit64 commented on September 26, 2024

@olimorris Should I be targeting the PmenuSbar bg or fg?

Edit: Neither of these work.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

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:

Screen Shot 2022-06-08 at 15 20 46@2x

  • Pmenu updates the menu background in cmp:

Screen Shot 2022-06-08 at 15 21 51@2x

Assuming you've not changed the default cmp config, you can see it sets Pmenu and PmenuSel in the default config here.

from onedarkpro.nvim.

Lalit64 avatar Lalit64 commented on September 26, 2024

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.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

I can't really help you beyond this unfortunately. To close this out Is recommend the below approach:

  • Change 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.
  • Reload Neovim
  • Observe if cmp has changed color
  • If not, run :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.

from onedarkpro.nvim.

dvalnn avatar dvalnn commented on September 26, 2024

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?

from onedarkpro.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.