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_width = 3
|
||||
line_endings = "Unix"
|
||||
quote_style = "AutoPreferSingle"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ local variants = {
|
|||
highlight_low = '#21202e',
|
||||
highlight_med = '#403d52',
|
||||
highlight_high = '#524f67',
|
||||
opacity = 0.1,
|
||||
none = 'NONE',
|
||||
},
|
||||
moon = {
|
||||
|
|
@ -34,7 +33,6 @@ local variants = {
|
|||
highlight_low = '#2a283e',
|
||||
highlight_med = '#44415a',
|
||||
highlight_high = '#56526e',
|
||||
opacity = 0.1,
|
||||
none = 'NONE',
|
||||
},
|
||||
dawn = {
|
||||
|
|
@ -53,7 +51,6 @@ local variants = {
|
|||
highlight_low = '#f4ede8',
|
||||
highlight_med = '#dfdad9',
|
||||
highlight_high = '#cecacd',
|
||||
opacity = 0.05,
|
||||
none = 'NONE',
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---Rosé Pine
|
||||
---@plugin akinsho/bufferline.nvim
|
||||
---@usage
|
||||
--- local highlights = require('rose-pine.plugins.bufferline')
|
||||
--- require('bufferline').setup({ highlights = highlights })
|
||||
--- Rosé Pine for bufferline
|
||||
--- https://github.com/akinsho/bufferline.nvim
|
||||
---
|
||||
--- @usage
|
||||
--- local highlights = require('rose-pine.plugins.bufferline')
|
||||
--- require('bufferline').setup({ highlights = highlights })
|
||||
|
||||
local p = require('rose-pine.palette')
|
||||
|
||||
|
|
@ -20,7 +21,7 @@ return {
|
|||
-- guibg = '<color-value-here>',
|
||||
-- },
|
||||
-- tab_selected = {
|
||||
-- guifg = tabline_sel_bg,
|
||||
-- guifg = '<color-value-here>',
|
||||
-- guibg = '<color-value-here>',
|
||||
-- },
|
||||
-- tab_close = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
---Rosé Pine
|
||||
---@plugin akinsho/toggleterm.nvim
|
||||
---@usage
|
||||
--- local highlights = require('rose-pine.plugins.toggleterm')
|
||||
--- require('toggleterm').setup({ highlights = highlights })
|
||||
--- Rosé Pine for toggleterm
|
||||
--- https://github.com/akinsho/toggleterm.nvim
|
||||
---
|
||||
--- @usage
|
||||
--- local highlights = require('rose-pine.plugins.toggleterm')
|
||||
--- require('toggleterm').setup({ highlights = highlights })
|
||||
|
||||
return {
|
||||
Normal = { link = 'Normal' },
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@ function M.get(config)
|
|||
local styles = {
|
||||
italic = (config.disable_italics and p.none) or 'italic',
|
||||
vert_split = (config.bold_vert_split and groups.border) or p.none,
|
||||
background = (config.disable_background and p.none) or groups.background,
|
||||
float_background = (config.disable_float_background and p.none) or groups.panel,
|
||||
background = (config.disable_background and p.none)
|
||||
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 = {
|
||||
ColorColumn = { bg = p.overlay },
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ local function parse_color(color)
|
|||
color = color:lower()
|
||||
|
||||
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
|
||||
|
||||
return color
|
||||
|
|
@ -40,7 +41,12 @@ util.blend = function(fg, bg, alpha)
|
|||
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
|
||||
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
|
||||
|
||||
---@param group string
|
||||
|
|
@ -55,7 +61,6 @@ util.highlight = function(group, color)
|
|||
|
||||
if color.link then
|
||||
vim.cmd(string.format('highlight! link %s %s', group, color.link))
|
||||
-- vim.cmd('highlight! link ' .. group .. ' ' .. color.link)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue