diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7fc8038 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.stylua.toml b/.stylua.toml index 48e35ae..9d5f247 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -1,6 +1,4 @@ -column_width = 100 +column_width = 80 indent_type = "Tabs" -indent_width = 3 line_endings = "Unix" quote_style = "AutoPreferSingle" - diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index 03981f4..d98eaec 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -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', }, } diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua index c95bc92..118b871 100644 --- a/lua/rose-pine/plugins/bufferline.lua +++ b/lua/rose-pine/plugins/bufferline.lua @@ -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 = '', -- }, -- tab_selected = { - -- guifg = tabline_sel_bg, + -- guifg = '', -- guibg = '', -- }, -- tab_close = { diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua index d73bd18..38924f9 100644 --- a/lua/rose-pine/plugins/toggleterm.lua +++ b/lua/rose-pine/plugins/toggleterm.lua @@ -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' }, diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index faf258d..16a8c3c 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -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 }, diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua index 113d673..2bfdf85 100644 --- a/lua/rose-pine/util.lua +++ b/lua/rose-pine/util.lua @@ -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