Skip to content
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

Add option to copy cterm from gui #76

Closed
wants to merge 1 commit into from

Conversation

mcchrish
Copy link
Contributor

Closes #75

@mcchrish mcchrish marked this pull request as ready for review October 31, 2021 07:12
@rktjmp
Copy link
Owner

rktjmp commented Oct 31, 2021

Have you tested this in Vim?

AFAIK, when I added the blend #29 #30 work around, I think Vim actually refused to parse the highlight at all if blend was present.

Does this mean gui=value should actually be dropped when in Vim mode? (edit: actually, I guess not otherwise someone would have raised an issue already?)

I am going to handle it a bit differently with a plugin architecture ece40a6 19e2a5d

Lush isn't really supposed to be Vim compatible but I recognize that is useful to some people. I can see there being more and more half-steps to compatibility as time goes on (say vim adds winblend vs blend) so I would rather off-shore that stuff into a specific vim compatibility layer instead of patching the compiler repeatedly.

Haven't quite thought about what the end user API for setting up plugins would look like yet. Probably um.... Just thinking out loud:

Theme folder has lushfile in the root, technically just a lua file. In it you can specify theme -> .viml files and any plugin chains for those or other transformations. This would sort of act like your build.lua.

-- lushfile

with("nodebones").generate({
  "colors/nordbones.vim" = { lush.lush }, -- lush.lush probably implicit, maybe
  "colors/nordbones_vimcompat.vim" = { lush.lush, lush.vim_compatible },
  "extra/kitty/nordbones.conf" = { lush.kitty, mcchrish.custom_something},
  "extra/css/nordbones.css" = { some_random.css_transformer }
})

-- ... etc
-- for file in dir do with(file) ...

When you want you can :Lush build and it will execute the lushfile.

That concept above is kind of mixing two ideas, the lush-viml-theme compiler plugins and a more general lush-to-anything transformers.

@mcchrish
Copy link
Contributor Author

mcchrish commented Oct 31, 2021

This is what it looks like in Vim:
Without cterm defined:

highlight StatusLine guifg=#2C363C guibg=#D1C7C3 guisp=NONE gui=NONE

Screen Shot 2021-11-01 at 6 17 19 AM

With cterm defined:

highlight StatusLine guifg=#2C363C guibg=#D1C7C3 guisp=NONE gui=NONE cterm=NONE

Screen Shot 2021-11-01 at 6 17 54 AM

Does this mean gui=value should actually be dropped when in Vim mode? (edit: actually, I guess not otherwise someone would have raised an issue already?)

No need, vim will just use the appropriate value depending on the environment it's running.

Lush isn't really supposed to be Vim compatible but I recognize that is useful to some people. I can see there being more and more half-steps to compatibility as time goes on (say vim adds winblend vs blend) so I would rather off-shore that stuff into a specific vim compatibility layer instead of patching the compiler repeatedly.

Edit: I removed my previous thoughts as I misunderstood your idea.

I like the idea of layered compiler options.

@rktjmp
Copy link
Owner

rktjmp commented Nov 4, 2021

@rktjmp rktjmp closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile option to mirror gui to cterm
2 participants