diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 7fc8038..0000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 9d5f247..0000000 --- a/.stylua.toml +++ /dev/null @@ -1,4 +0,0 @@ -column_width = 80 -indent_type = "Tabs" -line_endings = "Unix" -quote_style = "AutoPreferSingle" diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index ca82387..b7b0abe 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -2,68 +2,6 @@ local util = require('rose-pine.util') local M = {} -local config = { - bold_vert_split = false, - dark_variant = 'main', - dim_nc_background = false, - disable_background = false, - disable_float_background = false, - disable_italics = false, - - groups = { - background = 'base', - panel = 'surface', - border = 'highlight_med', - comment = 'muted', - link = 'iris', - punctuation = 'muted', - - error = 'love', - hint = 'iris', - info = 'foam', - warn = 'gold', - - git_add = 'foam', - git_change = 'rose', - git_delete = 'love', - git_dirty = 'rose', - git_ignore = 'muted', - git_merge = 'iris', - git_rename = 'pine', - git_stage = 'iris', - git_text = 'rose', - - headings = { - h1 = 'iris', - h2 = 'foam', - h3 = 'rose', - h4 = 'gold', - h5 = 'pine', - h6 = 'foam', - }, - }, - highlight_groups = {}, -} - -function M.setup(opts) - opts = opts or {} - vim.g.rose_pine_variant = opts.dark_variant or 'main' - - if opts.groups and type(opts.groups.headings) == 'string' then - opts.groups.headings = { - h1 = opts.groups.headings, - h2 = opts.groups.headings, - h3 = opts.groups.headings, - h4 = opts.groups.headings, - h5 = opts.groups.headings, - h6 = opts.groups.headings, - } - end - - config.user_variant = opts.dark_variant or nil - config = vim.tbl_deep_extend('force', config, opts) -end - function M.colorscheme() if vim.g.colors_name then vim.cmd('hi clear') @@ -72,19 +10,11 @@ function M.colorscheme() vim.opt.termguicolors = true vim.g.colors_name = 'rose-pine' - local theme = require('rose-pine.theme').get(config) + local theme = require('rose-pine.theme').get() -- Set theme highlights for group, color in pairs(theme) do - -- Skip highlight group if user overrides - if config.highlight_groups[group] == nil then - util.highlight(group, color) - end - end - - -- Set user highlights - for group, color in pairs(config.highlight_groups) do - util.highlight(group, color) + util.highlight(group, color) end end diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index d98eaec..e1e6975 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -1,66 +1,20 @@ -local variants = { - main = { - base = '#191724', - surface = '#1f1d2e', - overlay = '#26233a', - muted = '#6e6a86', - subtle = '#908caa', - text = '#e0def4', - love = '#eb6f92', - gold = '#f6c177', - rose = '#ebbcba', - pine = '#31748f', - foam = '#9ccfd8', - iris = '#c4a7e7', - highlight_low = '#21202e', - highlight_med = '#403d52', - highlight_high = '#524f67', - none = 'NONE', - }, - moon = { - base = '#232136', - surface = '#2a273f', - overlay = '#393552', - muted = '#6e6a86', - subtle = '#908caa', - text = '#e0def4', - love = '#eb6f92', - gold = '#f6c177', - rose = '#ea9a97', - pine = '#3e8fb0', - foam = '#9ccfd8', - iris = '#c4a7e7', - highlight_low = '#2a283e', - highlight_med = '#44415a', - highlight_high = '#56526e', - none = 'NONE', - }, - dawn = { - base = '#faf4ed', - surface = '#fffaf3', - overlay = '#f2e9e1', - muted = '#9893a5', - subtle = '#797593', - text = '#575279', - love = '#b4637a', - gold = '#ea9d34', - rose = '#d7827e', - pine = '#286983', - foam = '#56949f', - iris = '#907aa9', - highlight_low = '#f4ede8', - highlight_med = '#dfdad9', - highlight_high = '#cecacd', - none = 'NONE', - }, +local palette = { + base = '#171524', + surface = '#1f1d2e', + overlay = '#26233a', + muted = '#6e6a86', + subtle = '#908caa', + text = '#e0def4', + love = '#eb6f92', + gold = '#f69957', + rose = '#ebbcba', + pine = '#cd51d5', + foam = '#9ccfd8', + iris = '#c4a7e7', + highlight_low = '#21202e', + highlight_med = '#403d52', + highlight_high = '#524f67', + none = 'NONE' } -local palette = {} - -if vim.o.background == 'light' then - palette = variants.dawn -else - palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main'] -end - return palette diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 3fcc54a..f2a5107 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -2,21 +2,50 @@ local blend = require('rose-pine.util').blend local M = {} -function M.get(config) +function M.get() local p = require('rose-pine.palette') local theme = {} - local groups = config.groups or {} - 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, + local groups = { + background = 'base', + panel = 'surface', + border = 'highlight_med', + comment = 'muted', + link = 'iris', + punctuation = 'muted', + + error = 'love', + hint = 'iris', + info = 'foam', + warn = 'gold', + + git_add = 'foam', + git_change = 'rose', + git_delete = 'love', + git_dirty = 'rose', + git_ignore = 'muted', + git_merge = 'iris', + git_rename = 'pine', + git_stage = 'iris', + git_text = 'rose', + + headings = { + h1 = 'iris', + h2 = 'foam', + h3 = 'rose', + h4 = 'gold', + h5 = 'pine', + h6 = 'foam', + }, } - styles.nc_background = (config.dim_nc_background and groups.panel) - or styles.background + + local styles = { + italic = 'italic', + vert_split = p.none, + background = groups.background, + float_background = groups.panel, + } + styles.nc_background = styles.background theme = { ColorColumn = { bg = p.overlay }, diff --git a/readme.md b/readme.md index 973625b..2a7f258 100644 --- a/readme.md +++ b/readme.md @@ -1,102 +1 @@ -
-
-
All natural pine, faux fur and a bit of soho vibes for the classy minimalist
- -
-
-
-
-