Skip to content

Commit 71073d5

Browse files
committed
fix: generator actually works now
1 parent 6169d20 commit 71073d5

File tree

9 files changed

+314302
-499594
lines changed

9 files changed

+314302
-499594
lines changed

lua/pineapple/data.lua

+155,974-156,622
Large diffs are not rendered by default.

lua/pineapple/dataManager.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ local function setup()
3737
if
3838
vimColorScheme.data ~= nil
3939
and (
40-
(vimColorScheme.data.light ~= nil and vimColorScheme.data.light.vimFunction ~= nil)
41-
or (vimColorScheme.data.dark ~= nil and vimColorScheme.data.dark.vimFunction ~= nil)
40+
(vimColorScheme.data.light ~= nil and vimColorScheme.data.light["@keyword"] ~= nil)
41+
or (vimColorScheme.data.dark ~= nil and vimColorScheme.data.dark["@keyword"] ~= nil)
4242
)
4343
then
4444
if vimColorScheme.data.light ~= nil and vimColorScheme.data.light.LineNrBg == "#000000" then

lua/pineapple/example-code.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ local exampleCode = {
1010
{ "color", "vimOperParen", "NormalBg", "@variable.parameter" },
1111
{ ")", "vimParenSep", "NormalBg", "@punctuation.bracket" },
1212
{ " ", "vimFuncBody", "NormalBg", "vimFuncBody" },
13-
{ "abort", "vimIsCommand", "NormalBg", "vimIsCommand" },
13+
{ "abort", "vimIsCommand", "NormalBg", "@keyword" },
1414
},
1515
{
1616
{ " ", "vimFuncBody", "NormalBg", "vimFuncBody" },

updater/code_sample.vim

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
" Returns true if the color hex value is light
2-
function! IsHexColorLight(color) abort
3-
let l:raw_color = trim(a:color, '#')
4-
5-
let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
6-
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
7-
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)
8-
9-
let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000
10-
11-
return l:brightness > 155
12-
endfunction
1+
" Returns true if the color hex value is light
2+
function! IsHexColorLight(color) abort
3+
let l:raw_color = trim(a:color, '#')
4+
5+
let l:red = str2nr(substitute(l:raw_color, '(.{2}).{4}', '1', 'g'), 16)
6+
let l:green = str2nr(substitute(l:raw_color, '.{2}(.{2}).{2}', '1', 'g'), 16)
7+
let l:blue = str2nr(substitute(l:raw_color, '.{4}(.{2})', '1', 'g'), 16)
8+
9+
let l:brightness = ((l:red * 299) + (l:green * 587) + (l:blue * 114)) / 1000
10+
11+
return l:brightness > 155
12+
endfunction
1313

0 commit comments

Comments
 (0)