Shatur / neovim-ayu

Ayu theme for Neovim.
GNU General Public License v3.0
430 stars 45 forks source link

Request: Port airline theme #7

Closed bmulholland closed 3 years ago

bmulholland commented 3 years ago

https://github.com/Luxed/ayu-vim/blob/master/autoload/airline/themes/ayu.vim

bmulholland commented 3 years ago

I'd be open to trying to do this myself with a little guidance.

Shatur commented 3 years ago

Why do you use airline in the first place? Check lualine.nvim. It much faster and we already have a theme for it.

bmulholland commented 3 years ago

I'm waiting for one of the several neovim statusline libraries to mature, including a good out of the box experience. I don't want to waste hours configuring a minor part of my editor.

Currently:

  1. Airline is stable and doesn't require my time to set up or maintain.
  2. lualine doesn't look good out of the box. (Airline does)
  3. There's already an airline theme for both my light theme (ayu) and dark theme (sonokai). There is no lualine theme for sonokai.
  4. Airline has easy-to-use extensions that don't require configuration. In one line, I get integrations with fugitive, gutentags, and more. It's not even clear if these are possible with lualine, nevermind an easy way to set it up.
Shatur commented 3 years ago

Maybe you checked it a long time ago? As a Lualine user, I can say that it is pretty stable right now, looks great out of the box, very easy to set up (but also very extensible!) and has an “auto” theme option to automatically match your color scheme even if the theme is missing. But I understand that you may not want to migrate. I would suggest you to stick with ayu-vim for now that have a theme for airline.

bmulholland commented 3 years ago

Sure, I'll give it another shot :)

Here's the out-of-the-box lualine appearance with this theme. This is with theme = auto. The yellow is impossible to read.

Screen Shot 2021-09-22 at 12 33 17

I tried setting airline's theme to "ayu" to see if that would fix it, but then I get an error:

Screen Shot 2021-09-22 at 12 39 43

(Let me know if you want me to file a separate issue for this :) )

Shatur commented 3 years ago

Here's the out-of-the-box lualine appearance with this theme. This is with theme = auto. The yellow is impossible to read.

Yes, sometimes "auto" doesn't work nicely :)

I tried setting airline's theme to "ayu" to see if that would fix it, but then I get an error:

That's weird, will fix this evening, thanks. My lualine just fully customized, I don't use a theme for it.

Shatur commented 3 years ago

I tried setting airline's theme to "ayu" to see if that would fix it, but then I get an error:

I can't reproduce this error on my side. Could you provide your configuration?

bmulholland commented 3 years ago

https://github.com/bmulholland/dotfiles/blob/ayu-error/neovim/lua/plugins/lualine.lua

Shatur commented 3 years ago

Can't reproduce. Are you sure you are using this fork?

bmulholland commented 3 years ago

Yep: https://github.com/bmulholland/dotfiles/blob/ayu-error/neovim/lua/settings/plugins.lua#L90

Shatur commented 3 years ago

Weird, still can't reproduce it. I think that the issue is somewhere in your configuration (maybe just not in lualine configuration). Could you provide a complete minimal configuration to trigger the issue?

bmulholland commented 3 years ago

I think I figured it out, and it's something specific to my setup.

I use dark-notify to change back and forth for night mode. To err on the "don't blind me" side, I default to the dark theme, and shortly after boot the colors change to light. That means that the ayu theme is probably not set until after load. And after load, setting the lualine theme to ayu correctly loads the neovim-ayu lualine theme.

The fix was actually to implement what I was waiting for the fix before I did: add lualine theme switching to my dark-notify config. Now it loads after the ayu theme has been set, so the theme is accessible and no error happens.

Thanks for your help here. I'm migrated to lualine and, while it's still not quite as good as airline, it's probably good enough :)

Shatur commented 3 years ago

Glad the problem has been resolved!