-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Make Catppuccin consistent across plugins in regards to floating windows #439
Comments
Hey, thank you so much for such high effort suggession! Chapter 1: With borders
cmp = {
enabled = true,
border = {
completion = true,
documentation = true
}
} {
"hrsh7th/nvim-cmp",
opts = {
window = {
completion = {
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
},
documentation = {
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
},
},
},
}, It might look something like this: Chapter 2: No bordersWe used to have telescope with no border by default but some people didn't like it I think we can add an option for telescope telescope = {
enabled = true,
border = false
} In the screenshot you provided Chapter 3: ConsistencyOne important aspect to take into consideration is personal preference, personally I don't think which-key needs a border I also want telescope with no border and cmp with border but just for completion. We can provide a require("catppuccin").setup {
floating_border = "auto" | "on" | "off"
} If require("catppuccin").setup {
integration = {
telescope = { enabled = true, border = false },
cmp = { enabled = true, border = false },
which_key = { enabled = true, border = false }
}
} |
I like the idea of having a global variable to toggle the borders on | off or auto, and then using plugin specific configuration to override the border per plugin. On issue i still have is in regards to the background color of the floating window. One solution could be to use crust for all floating windows which will ensure that they are visible distinguishable from the file explorer and editor irrespective of the border settings. What do you thing would be a good color choice for floating window border and floating window background? |
I think we can set bg to NONE with border on, something like this would work: Pmenu = { bg = border and C.none or C.crust } |
The conclusion of this issue is that catppuccin is responsible to configure how the floating window border looks but it is up to the user to configure if a floating window has or does not have a border and what type of border characters to use. While in some situation we "fake" the absence of a floating window border by setting the bg and fg to the same color, we can not "fake" the presence of a border where a border was not added. The best approach here is to link from the plugin highlights back to the catppuccin highlights so that the settings will propagate from theme to plugin. |
Thank you very much for this wonderful theme that for me it has become the face of neovim.
There are inconsistencies between how floating windows are displayed.
For the purpose of visualizing the problem i have provided screenshots from telescope, which-key and nvim-cmp.
Default:
Given the fact that every plugin can choose how to implement the border for it's window this was inevitable but it can be fixed.
Solution1: with borders
Solution2: no borders
Issue with solution2
in order to distinguish the floating window from the rest of the application, the background color needs to be somewhere between base and overlay2.
To close to base and it will blend with the buffer.
To close to overlay2 and it tends to blend with cursor line and comments making it hard to distinguish them.
The question
What would be a guideline in regards to floating windows and borders in order to have a consistent experience across plugins in Catppuccin?
I would be happy to help with PR to address this inconsistencies.
The text was updated successfully, but these errors were encountered: