Skip to content

Commit

Permalink
fix: generator actually works now
Browse files Browse the repository at this point in the history
  • Loading branch information
CWood-sdf committed Jun 1, 2024
1 parent 6169d20 commit 71073d5
Show file tree
Hide file tree
Showing 9 changed files with 314,302 additions and 499,594 deletions.
312,596 changes: 155,974 additions & 156,622 deletions lua/pineapple/data.lua

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lua/pineapple/dataManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ local function setup()
if
vimColorScheme.data ~= nil
and (
(vimColorScheme.data.light ~= nil and vimColorScheme.data.light.vimFunction ~= nil)
or (vimColorScheme.data.dark ~= nil and vimColorScheme.data.dark.vimFunction ~= nil)
(vimColorScheme.data.light ~= nil and vimColorScheme.data.light["@keyword"] ~= nil)
or (vimColorScheme.data.dark ~= nil and vimColorScheme.data.dark["@keyword"] ~= nil)
)
then
if vimColorScheme.data.light ~= nil and vimColorScheme.data.light.LineNrBg == "#000000" then
Expand Down
2 changes: 1 addition & 1 deletion lua/pineapple/example-code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local exampleCode = {
{ "color", "vimOperParen", "NormalBg", "@variable.parameter" },
{ ")", "vimParenSep", "NormalBg", "@punctuation.bracket" },
{ " ", "vimFuncBody", "NormalBg", "vimFuncBody" },
{ "abort", "vimIsCommand", "NormalBg", "vimIsCommand" },
{ "abort", "vimIsCommand", "NormalBg", "@keyword" },
},
{
{ " ", "vimFuncBody", "NormalBg", "vimFuncBody" },
Expand Down
24 changes: 12 additions & 12 deletions updater/code_sample.vim
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
" Returns true if the color hex value is light
function! IsHexColorLight(color) abort
let l:raw_color = trim(a:color, '#')
let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)
let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000
return l:brightness > 155
endfunction
" Returns true if the color hex value is light
function! IsHexColorLight(color) abort
let l:raw_color = trim(a:color, '#')

let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)

let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000

return l:brightness > 155
endfunction

Loading

0 comments on commit 71073d5

Please sign in to comment.