mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
chore: format
This commit is contained in:
parent
25e7f54592
commit
88a19573b0
3 changed files with 5 additions and 21 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
column_width = 80
|
column_width = 100
|
||||||
indent_type = "Tabs"
|
indent_type = "Tabs"
|
||||||
quote_style = "AutoPreferSingle"
|
quote_style = "AutoPreferSingle"
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,7 @@ function M.colorscheme()
|
||||||
local bg = color.bg and 'guibg=' .. color.bg or 'guibg=NONE'
|
local bg = color.bg and 'guibg=' .. color.bg or 'guibg=NONE'
|
||||||
local sp = color.sp and 'guisp=' .. color.sp or ''
|
local sp = color.sp and 'guisp=' .. color.sp or ''
|
||||||
|
|
||||||
local hl = 'highlight '
|
local hl = 'highlight ' .. group .. ' ' .. style .. ' ' .. fg .. ' ' .. bg .. ' ' .. sp
|
||||||
.. group
|
|
||||||
.. ' '
|
|
||||||
.. style
|
|
||||||
.. ' '
|
|
||||||
.. fg
|
|
||||||
.. ' '
|
|
||||||
.. bg
|
|
||||||
.. ' '
|
|
||||||
.. sp
|
|
||||||
|
|
||||||
vim.cmd(hl)
|
vim.cmd(hl)
|
||||||
if color.link then
|
if color.link then
|
||||||
|
|
@ -49,7 +40,7 @@ end
|
||||||
|
|
||||||
function M.set(variant)
|
function M.set(variant)
|
||||||
vim.g.rose_pine_variant = variant
|
vim.g.rose_pine_variant = variant
|
||||||
vim.cmd([[colorscheme rose-pine]])
|
vim.cmd('colorscheme rose-pine')
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.toggle(variants)
|
function M.toggle(variants)
|
||||||
|
|
@ -64,9 +55,7 @@ function M.toggle(variants)
|
||||||
vim.g.rose_pine_current_variant = index[vim.g.rose_pine_variant] or 0
|
vim.g.rose_pine_current_variant = index[vim.g.rose_pine_variant] or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.g.rose_pine_current_variant = (
|
vim.g.rose_pine_current_variant = (vim.g.rose_pine_current_variant % #variants) + 1
|
||||||
vim.g.rose_pine_current_variant % #variants
|
|
||||||
) + 1
|
|
||||||
|
|
||||||
M.set(variants[vim.g.rose_pine_current_variant])
|
M.set(variants[vim.g.rose_pine_current_variant])
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,7 @@ function util.blend(fg, bg, alpha)
|
||||||
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
|
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
return string.format(
|
return string.format('#%02X%02X%02X', blendChannel(1), blendChannel(2), blendChannel(3))
|
||||||
'#%02X%02X%02X',
|
|
||||||
blendChannel(1),
|
|
||||||
blendChannel(2),
|
|
||||||
blendChannel(3)
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return util
|
return util
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue