You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
@boatnoah Sorry for this, I'm not using telescope.nvim and didn't notice this commit is breaking its appearance. Besides, #726 probably fixes this problem.
The reason will be displayed to describe this comment to others. Learn more.
@boatnoah Sorry for this, I'm not using telescope.nvim and didn't notice this commit is breaking its appearance. Besides, #726 probably fixes this problem.
The reason will be displayed to describe this comment to others. Learn more.
Sorry guys, though this's considered to be a bug fix, it now seems to be bringing more bugs than fixes... I'm going to revert this commit and maybe apply this some other time with more checks.
The reason will be displayed to describe this comment to others. Learn more.
I was surprised this was merged, since there has been some discussion in the past (see #347 and #313)
Personally, I think we should usually opt for a darker background (Mantle) for floating windows. The need for borders usually arises when a floating window's background matches the default background (there are other use cases, of course). This was the original complaint in #347 (user with no borders, complaining about matching background making stuff indistinguishable).
When a user desires borders, having a darker background for floating windows would also make the usage of a darker background for borders more desirable. The complaints here were that the backgrounds didn't match, not the darker background (for the border) itself. Changing every floating window background would be a "breaking change", though.
There are other use cases for the borders, and some cases require some adjustments. For instance, with this commit, I had to add this snippet to my nvim-cmp config:
The reason will be displayed to describe this comment to others. Learn more.
I might be too late in posting this, but when the first merge happened I was wondering the same about Telescope and after searching for a bit too long, I found out that I had to set Telescope's normal highlight to be a normal float color while configuring Telescope:
As far as my use cases went (using Mason, Lazy, and Telescope), that gave me a consistent look and feel where the border and float background were both dark.
But now that it was reverted, I went back to my old way of setting:
So now, Mason, Lazy, and Telescope all match the border's background color (which is not dark).
Not sure if that helps anything, but that's what I wound up doing for both the previous and current situations since I dislike having the mismatch between border and floating window background colors.
The reason will be displayed to describe this comment to others. Learn more.
@KodyVB Yeah that's the conflict: this PR not only fix some's preferred UI (e.g. border option: solid), but also breaks someone's (e.g. only border without a bg).
There should be a option that allow users to configure floating window UI in one place, which meets most user's need. Like fwindows = { border_color = 'blue', bg = false }, the bg controls both the background of border and the window. This might give users a easier and more intuitive way than using custom_highlights.
Besides just as I have mentioned, catppuccin.nvim does support customizing highlights. If you dislike the pre-provided highlights, you can define some by yourself, and they will override the pre-provided ones, so that you no longer need to do nvim_set_hls nor bear unexpected UI changes from the plugin.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get these weird borders around my telescope
Screenshot:
Before:
After:
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boatnoah Sorry for this, I'm not using telescope.nvim and didn't notice this commit is breaking its appearance. Besides, #726 probably fixes this problem.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha no worries! thanks for the quick reply.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not a telescope specific problem. It's affecting other floating windows, at least with rounded borders. (for example, cmp completions)
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My god. I've been figuring out for hours why my floating terminals have random borders
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry guys, though this's considered to be a bug fix, it now seems to be bringing more bugs than fixes... I'm going to revert this commit and maybe apply this some other time with more checks.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vollowx no worries.
I also tested it with tokyonight theme and I was having the same issue with the borders..
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is a more complex problem to be solved. There are 2 choices for 3 preferences:
Maybe there should be options to control this as not all the users know/want to customize the highlight manually by themselves...
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised this was merged, since there has been some discussion in the past (see #347 and #313)
Personally, I think we should usually opt for a darker background (Mantle) for floating windows. The need for borders usually arises when a floating window's background matches the default background (there are other use cases, of course). This was the original complaint in #347 (user with no borders, complaining about matching background making stuff indistinguishable).
When a user desires borders, having a darker background for floating windows would also make the usage of a darker background for borders more desirable. The complaints here were that the backgrounds didn't match, not the darker background (for the border) itself. Changing every floating window background would be a "breaking change", though.
There are other use cases for the borders, and some cases require some adjustments. For instance, with this commit, I had to add this snippet to my nvim-cmp config:
If we don't introduce an option, I think this compromise of having darker backgrounds would make most users happy.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be too late in posting this, but when the first merge happened I was wondering the same about Telescope and after searching for a bit too long, I found out that I had to set Telescope's normal highlight to be a normal float color while configuring Telescope:
As far as my use cases went (using Mason, Lazy, and Telescope), that gave me a consistent look and feel where the border and float background were both dark.
But now that it was reverted, I went back to my old way of setting:
So now, Mason, Lazy, and Telescope all match the border's background color (which is not dark).
Not sure if that helps anything, but that's what I wound up doing for both the previous and current situations since I dislike having the mismatch between border and floating window background colors.
31fcfb0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KodyVB Yeah that's the conflict: this PR not only fix some's preferred UI (e.g. border option: solid), but also breaks someone's (e.g. only border without a bg).
There should be a option that allow users to configure floating window UI in one place, which meets most user's need. Like
fwindows = { border_color = 'blue', bg = false }
, thebg
controls both the background of border and the window. This might give users a easier and more intuitive way than usingcustom_highlights
.Besides just as I have mentioned, catppuccin.nvim does support customizing highlights. If you dislike the pre-provided highlights, you can define some by yourself, and they will override the pre-provided ones, so that you no longer need to do
nvim_set_hl
s nor bear unexpected UI changes from the plugin.