Skip to content

Commit 534b32c

Browse files
committed
fix diff view
1 parent 3f1c21f commit 534b32c

File tree

2 files changed

+39
-45
lines changed

2 files changed

+39
-45
lines changed

lua/monokai.lua

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ M.classic = {
1212
base6 = '#9ca0a4',
1313
base7 = '#b1b1b1',
1414
border = '#a1b5b1',
15-
brown = "#504945",
15+
brown = '#504945',
1616
white = '#f8f8f0',
1717
grey = '#8F908A',
1818
black = '#000000',
@@ -23,13 +23,11 @@ M.classic = {
2323
orange = '#fd971f',
2424
purple = '#ae81ff',
2525
red = '#e95678',
26-
diff_add_fg = '#6a8f1f',
27-
diff_add_bg = '#3d5213',
28-
diff_remove_fg = '#4a0f23',
29-
diff_remove_bg = '#a3214c',
30-
diff_change_fg = '#7AA6DA',
31-
diff_change_bg = '#537196',
32-
none = 'NONE'
26+
diff_add = '#3d5213',
27+
diff_remove = '#4a0f23',
28+
diff_change = '#27406b',
29+
diff_text = '#23324d',
30+
none = 'NONE',
3331
}
3432

3533
M.pro = {
@@ -42,7 +40,7 @@ M.pro = {
4240
base6 = '#72696A',
4341
base7 = '#B1B1B1',
4442
border = '#A1B5B1',
45-
brown = "#504945",
43+
brown = '#504945',
4644
white = '#FFF1F3',
4745
grey = '#72696A',
4846
black = '#000000',
@@ -53,13 +51,11 @@ M.pro = {
5351
orange = '#FC9867',
5452
purple = '#AB9DF2',
5553
red = '#FD6883',
56-
diff_add_fg = '#6A8F1F',
57-
diff_add_bg = '#3D5213',
58-
diff_remove_fg = '#4A0F23',
59-
diff_remove_bg = '#A3214C',
60-
diff_change_fg = '#7AA6DA',
61-
diff_change_bg = '#537196',
62-
none = 'NONE'
54+
diff_add = '#3d5213',
55+
diff_remove = '#4a0f23',
56+
diff_change = '#27406b',
57+
diff_text = '#23324d',
58+
none = 'NONE',
6359
}
6460

6561
M.highlight = function(group, color)
@@ -103,7 +99,7 @@ M.load_syntax = function(palette)
10399
Cursor = {
104100
fg = palette.none,
105101
bg = palette.none,
106-
style = 'reverse'
102+
style = 'reverse',
107103
},
108104
ColorColumn = {
109105
fg = palette.none,
@@ -166,7 +162,7 @@ M.load_syntax = function(palette)
166162
},
167163
LineNr = {
168164
fg = palette.base5,
169-
bg = palette.base2
165+
bg = palette.base2,
170166
},
171167
SignColumn = {
172168
fg = palette.white,
@@ -223,20 +219,16 @@ M.load_syntax = function(palette)
223219
bg = palette.none,
224220
},
225221
DiffAdd = {
226-
fg = palette.diff_add_fg,
227-
bg = palette.diff_add_bg,
222+
bg = palette.diff_add,
228223
},
229224
DiffDelete = {
230-
fg = palette.diff_remove_fg,
231-
bg = palette.diff_remove_bg,
225+
bg = palette.diff_remove,
232226
},
233227
DiffChange = {
234-
fg = palette.diff_change_fg,
235-
bg = palette.diff_change_bg,
228+
bg = palette.diff_change,
236229
},
237230
DiffText = {
238-
fg = palette.black,
239-
bg = palette.aqua,
231+
bg = palette.diff_text,
240232
},
241233
diffAdded = {
242234
fg = palette.green,
@@ -408,7 +400,7 @@ M.load_syntax = function(palette)
408400
},
409401
Exception = {
410402
fg = palette.pink,
411-
}
403+
},
412404
}
413405
end
414406

@@ -487,7 +479,7 @@ M.load_plugin_syntax = function(palette)
487479
fg = palette.white,
488480
},
489481
TSProperty = {
490-
fg = palette.white
482+
fg = palette.white,
491483
},
492484
TSPunctDelimiter = {
493485
fg = palette.white,
@@ -523,13 +515,13 @@ M.load_plugin_syntax = function(palette)
523515
fg = palette.aqua,
524516
},
525517
TSException = {
526-
fg = palette.pink
518+
fg = palette.pink,
527519
},
528520
TSField = {
529-
fg = palette.white
521+
fg = palette.white,
530522
},
531523
TSFloat = {
532-
fg = palette.purple
524+
fg = palette.purple,
533525
},
534526
dbui_tables = {
535527
fg = palette.white,
@@ -594,11 +586,11 @@ M.load_plugin_syntax = function(palette)
594586
style = 'NONE',
595587
},
596588
TelescopeBorder = {
597-
fg = palette.border
589+
fg = palette.border,
598590
},
599591
TelescopePromptBorder = {
600-
fg = palette.border
601-
}
592+
fg = palette.border,
593+
},
602594
}
603595
end
604596

@@ -616,17 +608,13 @@ M.setup = function(palette)
616608
M.highlight(group, colors)
617609
end
618610
local async_load_plugin = nil
619-
async_load_plugin = vim.loop.new_async(
620-
vim.schedule_wrap(
621-
function()
622-
local plugin_syntax = M.load_plugin_syntax(used_palette)
623-
for group, colors in pairs(plugin_syntax) do
624-
M.highlight(group, colors)
625-
end
626-
async_load_plugin:close()
627-
end
628-
)
629-
)
611+
async_load_plugin = vim.loop.new_async(vim.schedule_wrap(function()
612+
local plugin_syntax = M.load_plugin_syntax(used_palette)
613+
for group, colors in pairs(plugin_syntax) do
614+
M.highlight(group, colors)
615+
end
616+
async_load_plugin:close()
617+
end))
630618
async_load_plugin:send()
631619
end
632620

stylua.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
column_width = 120
2+
line_endings = 'Unix'
3+
indent_type = 'Spaces'
4+
indent_width = 4
5+
quote_style = 'ForceSingle'
6+
no_call_parentheses = false

0 commit comments

Comments
 (0)