-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim-cmp with border issue disucussion #72
Comments
as discussed in #69 this is approved, I just need to figure out how I want to implement it :), I should have a patch in the next week :) |
@psynyde Ive been messing around with this and haven't found a good solution The main issue has to do with nvim-cmp.. basically when you tell nvim cmp to use a borders, if switches from inheriting from So I'm not sure what I want to do going forward, I think adding a section in the docs on there readme to tell people how to have nice floatboarder for nvim-cmp might be the best option. -- make nvim-cmp's boarders look pretty :)
local lackluster = require("lackluster")
lackluster.setup({
tweak_highlight = {
FloatBorder = {
fg = lackluster.color.gray5,
bg = lackluster.color_specail.main_background,
},
},
})
vim.cmd.colorscheme("lackluster-hack") what are your thoughts on this? |
After some more digging I decided to open an issue with nvim-cmp hrsh7th/nvim-cmp#2039 to see if we can solve this issue by patching nvim-cmp :) That issue has a more through description of what I think the issue is. |
I also think this'd be the better option until it's fixed by cmp author. Edit: before having a conclusion can you set |
yep yep, |
I'll wait for a reply on the nvim-cmp issue before I decide how to resolve this issue :) |
created a new nvm-cmp issue after realizing the one i previously made did not properly use their bug template hrsh7th/nvim-cmp#2042 |
@psynyde here is a snippet that you can use to test the proposed change to nvim-cmp if you are intersted cmp.setup({
window = {
completion = vim.tbl_extend("force", cmp.config.window.bordered(), {
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
}),
documentation = vim.tbl_extend("force", cmp.config.window.bordered(), {
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
}),
},
-- rest of your config
}) |
|
this fix my problem, maybe it works for you, too cmp.setup({
snippet = {
expand = function(args)
vim.snippet.expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
...
} lackluster.setup({
tweak_syntax = {
comment = lackluster.color.gray5,
},
tweak_background = {
-- normal = "default", -- main background
normal = "none", -- transparent
},
tweak_highlight = {
FloatBorder = {
overwrite = true,
fg = lackluster.color.gray5,
bg = "NONE",
},
["@keyword"] = {
overwrite = true,
bold = false,
italic = true,
fg = lackluster.color.gray6,
},
["@keyword.return"] = {
overwrite = true,
bold = false,
italic = true,
fg = lackluster.color.green,
},
},
})
|
@fhawk12 thanks for sharing! Makes me realize I need to make a tweak to allow for transparency with floats.. I'm on holiday rn but I'll make a patch next week sometime! Funny enough though, it's one of those things we're the right outcome is happening but for the wrong reason, nvim-cmps bug essentially doesn't effect you because you wanted transparency, and the thing they are assigning to background for the cmp-window happens to be transparent, which is lucky I guess :) when/if the bug gets patched, it should still look the way you want it to but for the right reason :) |
I got the changed merged into magazine.nvim (a nvim-cmp fork) |
This is with default pallet:
This is with
Floatborder
guibg=#101010
:Originally posted by @psynyde in #69 (comment)
The text was updated successfully, but these errors were encountered: