-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat(cursorline)!: add cursorline bg option for visual selection color #101
Conversation
- Add cursorline.bg option with default value of "#191D24". - Remove cursorline.theme option. - Update docs to reflect new defaults. BREAKING CHANGE: cursorline.theme option removed, replaced by cursorline.bg.
Some time this week, I will create another pull request to allow use of the palette in default options. |
Oops it breaks if there is a transparent background, I don't know how those work so give me a while an I will fix it. |
Okay, I can't figure out how lua/nordic/colors/init.lua handles transparent backgrounds. I will try to figure it out tomorrow, but for now this whole thing don't work. C.bg = (O.transparent_bg and C.none) or C.gray0
-- Diffs
C.diff = {
change0 = U.blend(C.blue1, C.bg, 0.05),
change1 = U.blend(C.blue2, C.bg, diff_blend),
add = U.blend(C.green.base, C.bg, diff_blend),
delete = U.blend(C.red.base, C.bg, diff_blend),
} |
Does it work? |
After #103 it should pass tests. |
So it the test actually failed with that bug? Odd, it did not fail on main. |
I changed where the options are imported, in mine they are re-imported with each call of setup, I don't really know how Lua imports work but my guess is that they weren't being applied on the second run of setup() in the tests. |
Ah. The options have to be re-imported when extending the palette. Nice catch |
I also want to add callbacks for pre and post extension, but we can do that in a different PR. |
Actually, I am still confused. When you call |
When I print the options in extend_palette I get the same values for each of the tests. This pull request should fix that though, accidentally... Main output: ts_context = table: 0x7f5cf5e26828
on_palette = function: 0x7f5cf5e263f8
transparent_bg = false
reduced_blue = true
cursorline = table: 0x7f5cf5e26470
swap_backgrounds = false
override = table: 0x7f5cf5e26428
bright_border = false
bold_keywords = false
italic_comments = true
leap = table: 0x7f5cf5e267a8
telescope = table: 0x7f5cf5e26728
noice = table: 0x7f5cf5e266a8
ts_context = table: 0x7f5cf5e26828
on_palette = function: 0x7f5cf5e263f8
transparent_bg = false
reduced_blue = true
cursorline = table: 0x7f5cf5e26470
swap_backgrounds = false
override = table: 0x7f5cf5e26428
bright_border = false
bold_keywords = false
italic_comments = true
leap = table: 0x7f5cf5e267a8
telescope = table: 0x7f5cf5e26728
noice = table: 0x7f5cf5e266a8 This PR: swap_backgrounds = false
on_palette = function: 0x7f10031be4b0
ts_context = table: 0x7f1002904758
leap = table: 0x7f10029048d8
reduced_blue = false
cursorline = table: 0x7f1002904a58
transparent_bg = true
override = table: 0x7f1002904ba0
noice = table: 0x7f1002905768
bright_border = false
italic_comments = true
bold_keywords = false
telescope = table: 0x7f10029055e8
swap_backgrounds = true
on_palette = function: 0x7f1002977268
ts_context = table: 0x7f1002909c80
transparent_bg = false
reduced_blue = true
cursorline = table: 0x7f100290a100
telescope = table: 0x7f100290b290
override = table: 0x7f100290a308
noice = table: 0x7f100290b4d0
italic_comments = false
bright_border = true
bold_keywords = true
leap = table: 0x7f1002909ec0 |
…sparent_bg is true.
…hen transparent_bg is true." This reverts commit ea86462.
reverted fix that can be implemented in #105 or a similar pr. |
…g is true. & fix error message colors/init.lua:64: attempt to index global 'O' (a nil value).
Its a good thing you didn't get to merging this because it was broken... But it should be fixed now. |
Also it closes #108 due to change in where the options are imported |
Let's come back to this ater #113! |
I am closing this in favor of a more general solution to changing the palette & extended palette. |
closes #100
BREAKING CHANGE: cursorline.theme option removed, replaced by cursorline.bg.