gbprod / nord.nvim

An arctic, north-bluish clean and elegant Neovim theme.
Do What The F*ck You Want To Public License
183 stars 22 forks source link

[Question] How to set some border or separator when viewing definition? #78

Open hpdipto opened 2 days ago

hpdipto commented 2 days ago

When viewing a definition with k, how can I set some separator of the definition popup from the background? In this image, the red mark box is the definition window. I want some border or background color difference here. How can I achieve this? image

gbprod commented 1 day ago

It's a configuration on nvim-cmp :

      cmp.setup({
        window = {
          documentation = cmp.config.window.bordered({
            winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
          }),
        },
       ...
hpdipto commented 1 day ago

I'm using following in my cmp.lua script under plugins directory for lazyvim:

return {
    "hrsh7th/nvim-cmp",
    dependencies = {
        "hrsh7th/cmp-nvim-lsp",
        "hrsh7th/cmp-buffer",
        "hrsh7th/cmp-path",
        "hrsh7th/cmp-cmdline",
        "saadparwaiz1/cmp_luasnip",
        "L3MON4D3/LuaSnip",
    },
    config = function()
        local cmp = require("cmp")
        cmp.setup({
            snippet = {
                expand = function(args)
                    require("luasnip").lsp_expand(args.body)
                end,
            },
            mapping = cmp.mapping.preset.insert({
                ["<C-n>"] = cmp.mapping.select_next_item(),
                ["<C-p>"] = cmp.mapping.select_prev_item(),
                ["<C-d>"] = cmp.mapping.scroll_docs(-4),
                ["<C-u>"] = cmp.mapping.scroll_docs(4),
                ["<C-Space>"] = cmp.mapping.complete(),
                ["<C-e>"] = cmp.mapping.abort(),
                ["<CR>"] = cmp.mapping.confirm({ select = true }),
            }),
            sources = cmp.config.sources({
                { name = "nvim_lsp" },
                { name = "luasnip" },
                { name = "buffer" },
                { name = "path" },
            }),
        })
    end,
}

But no improvements: image