mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
refactor: format and remove unused values
- update format rules - update plugin file headers - remove unused opacity from palette
This commit is contained in:
parent
bc07e54924
commit
4a3b4512fc
7 changed files with 40 additions and 23 deletions
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = tab
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.lua]
|
||||||
|
indent_size = 3
|
||||||
|
indent_style = tab
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
column_width = 100
|
column_width = 80
|
||||||
indent_type = "Tabs"
|
indent_type = "Tabs"
|
||||||
indent_width = 3
|
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
quote_style = "AutoPreferSingle"
|
quote_style = "AutoPreferSingle"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ local variants = {
|
||||||
highlight_low = '#21202e',
|
highlight_low = '#21202e',
|
||||||
highlight_med = '#403d52',
|
highlight_med = '#403d52',
|
||||||
highlight_high = '#524f67',
|
highlight_high = '#524f67',
|
||||||
opacity = 0.1,
|
|
||||||
none = 'NONE',
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
moon = {
|
moon = {
|
||||||
|
|
@ -34,7 +33,6 @@ local variants = {
|
||||||
highlight_low = '#2a283e',
|
highlight_low = '#2a283e',
|
||||||
highlight_med = '#44415a',
|
highlight_med = '#44415a',
|
||||||
highlight_high = '#56526e',
|
highlight_high = '#56526e',
|
||||||
opacity = 0.1,
|
|
||||||
none = 'NONE',
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
dawn = {
|
dawn = {
|
||||||
|
|
@ -53,7 +51,6 @@ local variants = {
|
||||||
highlight_low = '#f4ede8',
|
highlight_low = '#f4ede8',
|
||||||
highlight_med = '#dfdad9',
|
highlight_med = '#dfdad9',
|
||||||
highlight_high = '#cecacd',
|
highlight_high = '#cecacd',
|
||||||
opacity = 0.05,
|
|
||||||
none = 'NONE',
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
---Rosé Pine
|
--- Rosé Pine for bufferline
|
||||||
---@plugin akinsho/bufferline.nvim
|
--- https://github.com/akinsho/bufferline.nvim
|
||||||
---@usage
|
---
|
||||||
--- local highlights = require('rose-pine.plugins.bufferline')
|
--- @usage
|
||||||
--- require('bufferline').setup({ highlights = highlights })
|
--- local highlights = require('rose-pine.plugins.bufferline')
|
||||||
|
--- require('bufferline').setup({ highlights = highlights })
|
||||||
|
|
||||||
local p = require('rose-pine.palette')
|
local p = require('rose-pine.palette')
|
||||||
|
|
||||||
|
|
@ -20,7 +21,7 @@ return {
|
||||||
-- guibg = '<color-value-here>',
|
-- guibg = '<color-value-here>',
|
||||||
-- },
|
-- },
|
||||||
-- tab_selected = {
|
-- tab_selected = {
|
||||||
-- guifg = tabline_sel_bg,
|
-- guifg = '<color-value-here>',
|
||||||
-- guibg = '<color-value-here>',
|
-- guibg = '<color-value-here>',
|
||||||
-- },
|
-- },
|
||||||
-- tab_close = {
|
-- tab_close = {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
---Rosé Pine
|
--- Rosé Pine for toggleterm
|
||||||
---@plugin akinsho/toggleterm.nvim
|
--- https://github.com/akinsho/toggleterm.nvim
|
||||||
---@usage
|
---
|
||||||
--- local highlights = require('rose-pine.plugins.toggleterm')
|
--- @usage
|
||||||
--- require('toggleterm').setup({ highlights = highlights })
|
--- local highlights = require('rose-pine.plugins.toggleterm')
|
||||||
|
--- require('toggleterm').setup({ highlights = highlights })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Normal = { link = 'Normal' },
|
Normal = { link = 'Normal' },
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,13 @@ function M.get(config)
|
||||||
local styles = {
|
local styles = {
|
||||||
italic = (config.disable_italics and p.none) or 'italic',
|
italic = (config.disable_italics and p.none) or 'italic',
|
||||||
vert_split = (config.bold_vert_split and groups.border) or p.none,
|
vert_split = (config.bold_vert_split and groups.border) or p.none,
|
||||||
background = (config.disable_background and p.none) or groups.background,
|
background = (config.disable_background and p.none)
|
||||||
float_background = (config.disable_float_background and p.none) or groups.panel,
|
or groups.background,
|
||||||
|
float_background = (config.disable_float_background and p.none)
|
||||||
|
or groups.panel,
|
||||||
}
|
}
|
||||||
styles.nc_background = (config.dim_nc_background and groups.panel) or styles.background
|
styles.nc_background = (config.dim_nc_background and groups.panel)
|
||||||
|
or styles.background
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
ColorColumn = { bg = p.overlay },
|
ColorColumn = { bg = p.overlay },
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ local function parse_color(color)
|
||||||
color = color:lower()
|
color = color:lower()
|
||||||
|
|
||||||
if not color:find('#') and color ~= 'none' then
|
if not color:find('#') and color ~= 'none' then
|
||||||
color = require('rose-pine.palette')[color] or vim.api.nvim_get_color_by_name(color)
|
color = require('rose-pine.palette')[color]
|
||||||
|
or vim.api.nvim_get_color_by_name(color)
|
||||||
end
|
end
|
||||||
|
|
||||||
return color
|
return color
|
||||||
|
|
@ -40,7 +41,12 @@ util.blend = function(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('#%02X%02X%02X', blend_channel(1), blend_channel(2), blend_channel(3))
|
return string.format(
|
||||||
|
'#%02X%02X%02X',
|
||||||
|
blend_channel(1),
|
||||||
|
blend_channel(2),
|
||||||
|
blend_channel(3)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param group string
|
---@param group string
|
||||||
|
|
@ -55,7 +61,6 @@ util.highlight = function(group, color)
|
||||||
|
|
||||||
if color.link then
|
if color.link then
|
||||||
vim.cmd(string.format('highlight! link %s %s', group, color.link))
|
vim.cmd(string.format('highlight! link %s %s', group, color.link))
|
||||||
-- vim.cmd('highlight! link ' .. group .. ' ' .. color.link)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue