Code Monkey home page Code Monkey logo

Comments (13)

A-Lamia avatar A-Lamia commented on June 11, 2024 1

That would be up to AstroNvim it self to abstract that out in to a global border toggle, we get in to really strange territory when themes are modifying plugin config settings. Potentially also overriding user preferences, Imagine you had put all that work just now to enable borders and a theme you downloaded disabled them, and now you need to fight with it for load order or visa versa. :)

SIDE NOTE: I attempted something like this with a global blend to make it easier on the end user, we ended up removing it because people didn't like it overwriting there own settings, it might have made it easier when using AstroTheme but with other themes now you needed to write more code to toggle different states.

from astrotheme.

mehalter avatar mehalter commented on June 11, 2024

have you customized the AstroTheme configuration at all? The default AstroNvim setup dims pretty heavily

2024-05-07_20:47:55_screenshot

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Hey @mehalter thanks for replying. I have not customized astro theme's or highlights. But notice how even on your screenshot we can't tell where Mason's window starts or ends. It seems it's dimming the fg but not the bg?

The autocompletion with <C-Space> is a bit better because it at least has a border:

CleanShot 2024-05-07 at 18 12 32

But the one with <C-n> doesn't:
CleanShot 2024-05-07 at 18 13 29

Feels like all those floats should behave the same and have a clear indication they're a float/modal on top of something else

from astrotheme.

mehalter avatar mehalter commented on June 11, 2024

these plugins all have different methods of things. the completion menus are Pmenus and not buffers. Buffers are darkened when they are not active and active buffers are lightened. That is why the mason window is lightened and the background is darkened. Mason does not have a border by default and I'm not sure if it's configurable. It's unrelated to the highlights in this case. The <C-n> menu is the default completion also not something with a border. We go out of our way to add a border to cmp because it makes it easier

from astrotheme.

mehalter avatar mehalter commented on June 11, 2024

because active windows are lightened, floating menus are naturally darkened to create a strong contrast and clear semantic separation. I don't think we want to change these default highlights at all because of this

from astrotheme.

mehalter avatar mehalter commented on June 11, 2024

If you play around with it and come up with some better defaults feel free to open a PR with suggestions

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Thanks @mehalter

these plugins all have different methods of things.

Yeah, I get that. So are you saying that for Astro's theme there's not appetite to provide that more consistent experience/UX across those plugins? I thought that for those in particular we would since they're an integral part of AstroNvim itself.

to create a strong contrast and clear semantic separation

That's exactly what i want! My point here is that it is not happening. i.e. the contrast is not high enough, it is barely visible! You have to squint to (maybe) be able to tell where the floats start and end

If you play around with it and come up with some better defaults feel free to open a PR with suggestions

will do. As a matter of fact i was trying it as this thread developed, and I ran into a hiccup. The v4 template suggests using "astrotheme" as key to customize highlights: https://github.com/AstroNvim/template/blob/main/lua/plugins/astroui.lua#L20 but that didn't work for me. but if I change it to "astrodark" then it works. Even when i do ":colors astrotheme" and the immediately i call ":colors", the result is "astrodark", not "astrotheme", so that might be preventing the customizations to work like the template suggests.

Will follow up here when i have something to show/propose. Thanks again

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Thoughts?
Played with it for a bit. Here's how a completion and Mason looks like. Thoughts?

CleanShot 2024-05-07 at 19 46 41

CleanShot 2024-05-07 at 19 47 16

from astrotheme.

mehalter avatar mehalter commented on June 11, 2024

This doesn't fit with the vibe and decreases contrast within the window. Also it doesn't seem to really change the contrast all that much between the foreground and background windows. It seems to be more warm toned and brown rather than the cool toned and blueish part of the theme

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Welp, I tried :D

I'll leave the config here if people in the future is interested:

      astrodark = { -- a table of overrides/changes when applying the astrotheme theme
        FloatBorder = { fg = "#cccccc" },
        NormalFloat = { bg = "#333333" },
        PMenu = { bg = "#333333" },
        PMenuSel = { bg = "#999999", fg = "#000000" },
      },

from astrotheme.

A-Lamia avatar A-Lamia commented on June 11, 2024

I'd like to note, there is no wrong or right answer to what each individual feels is better for them, that's why a lot of time was spent to make things really easy to modify, a lot of time is spent on my side with real tooling to make sure as much parts of AstroThemes as possible is within scientifically acceptable contrast levels with most the importance put on text first, Thanks for your input though.

As a side note, you can also add borders in the AstroTheme config it's a bool toggle, if you go through the documentation for AstroTheme there is a lot of settings for you to use :).

NOTE: If the plugin it self however does not support borders then they will not be visable, that is outside of a Themes scope as we don't modify anything other then highlight related stuff.

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Hey @A-Lamia totally in agreement! And I thank for your efforts! That's why I'm trying the theme out to begin with! 😊

As for the bool toggle for borders, not sure what you meant: it is true by default and i didn't change it...

Here's the config I had to do to actually enable borders to Lazy and Mason (after reading their documentation, ideally and integrated theme like this would abstract this away):

on lazy_setup:

require("lazy").setup({
  {
    "AstroNvim/AstroNvim",
    [...]
    ui = { backdrop = 100, border = "rounded" },
    [...]
} --[[@as LazyConfig]])

anywhere in your plugins/:

return {
  {
    "williamboman/mason.nvim",
    opts = {
      ui = {
        border = "rounded",
      },
    },
  },
}

So maybe by setting the border = true in the theme, the theme should go ahead and do what the above for Lazy and Mason too?

Here's how Lazy looks now:
CleanShot 2024-05-07 at 21 04 59

and mason:
CleanShot 2024-05-07 at 21 05 38

I think even with just the borders (without my custom background), it would already be a big improvement. But again, as you mentioned, it's all a matter of preferences in the end ;)

Thanks again!

from astrotheme.

lfilho avatar lfilho commented on June 11, 2024

Yes, I agree it would have to be at the AstroNvim level, not the theme. The theme could then just customize colors, etc.

Regarding "people didn't like it overwriting there own settings", maybe an option wouldbe be to make it an opt-in config...

from astrotheme.

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.