diff --git a/colors/rose-pine.vim b/colors/rose-pine.vim index af1ddba..0df6221 100644 --- a/colors/rose-pine.vim +++ b/colors/rose-pine.vim @@ -1,6 +1,3 @@ -lua package.loaded['rose-pine'] = nil -lua package.loaded['rose-pine.config'] = nil lua package.loaded['rose-pine.palette'] = nil -lua package.loaded['rose-pine.theme'] = nil lua require('rose-pine').colorscheme() diff --git a/lua/rose-pine/bufferline/init.lua b/lua/rose-pine/bufferline/init.lua deleted file mode 100644 index 3ae77b4..0000000 --- a/lua/rose-pine/bufferline/init.lua +++ /dev/null @@ -1,23 +0,0 @@ -local p = require('rose-pine.palette') - --- TODO: Someone who uses bufferline.nvim is free to PR with this addition --- `:h bufferline-highlights` --- --- The intended use would be (or any better solution): --- --- ``` --- local highlights = require('rose-pine.bufferline') --- require('bufferline').setup({ --- highlights = highlights --- }) --- ``` -return { - fill = { - guifg = p.text, - guibg = p.base, - }, - background = { - guifg = p.text, - guibg = p.base, - }, -} diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua deleted file mode 100644 index 6b3ac12..0000000 --- a/lua/rose-pine/config.lua +++ /dev/null @@ -1,74 +0,0 @@ -local palette = require('rose-pine.palette') - -local function opt(key, default) - key = 'rose_pine_' .. key - - if vim.g[key] == nil then - return default - end - - if vim.g[key] == 0 or vim.g[key] == false then - return false - end - - return vim.g[key] -end - -local config = { - variant = opt('variant', 'main'), - - bold_vertical_split_line = opt('bold_vertical_split_line', false), - disable_italics = opt('disable_italics', false), - disable_background = opt('disable_background', false), - disable_float_background = opt('disable_float_background', false), - inactive_background = opt('inactive_background', false), - - colors = { - border = palette.highlight_med, - comment = palette.muted, - link = palette.iris, - punctuation = palette.subtle, - - error = palette.love, - hint = palette.iris, - info = palette.foam, - warn = palette.gold, - - git_add = palette.foam, - git_change = palette.rose, - git_delete = palette.love, - git_dirty = palette.rose, - git_ignore = palette.muted, - git_merge = palette.iris, - git_rename = palette.pine, - git_stage = palette.iris, - git_text = palette.rose, - - ---@type string|table - headings = { - h1 = palette.iris, - h2 = palette.foam, - h3 = palette.rose, - h4 = palette.gold, - h5 = palette.pine, - h6 = palette.foam, - }, - }, -} - -local colors = vim.g.rose_pine_colors or {} - -if type(colors.headings) == 'string' then - colors.headings = { - h1 = colors.headings, - h2 = colors.headings, - h3 = colors.headings, - h4 = colors.headings, - h5 = colors.headings, - h6 = colors.headings, - } -end - -config.colors = vim.tbl_deep_extend('force', config.colors, colors) - -return config diff --git a/lua/rose-pine/galaxyline/theme.lua b/lua/rose-pine/galaxyline/theme.lua index 5142949..1183aa9 100644 --- a/lua/rose-pine/galaxyline/theme.lua +++ b/lua/rose-pine/galaxyline/theme.lua @@ -3,17 +3,17 @@ if not present then return end -local palette = require('rose-pine.palette') +local p = require('rose-pine.palette') galaxyline_colors['rose-pine'] = { - bg = palette.overlay, - fg = palette.text, - fg_alt = palette.subtle, - blue = palette.foam, - cyan = palette.foam, - green = palette.muted, - magenta = palette.iris, - orange = palette.rose, - red = palette.love, - yellow = palette.gold, + bg = p.overlay, + fg = p.text, + fg_alt = p.subtle, + blue = p.foam, + cyan = p.foam, + green = p.muted, + magenta = p.iris, + orange = p.rose, + red = p.love, + yellow = p.gold, } diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index f872457..4e10311 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -1,4 +1,156 @@ local M = {} +local show_init_messages = true + +local function check_for_deprecated_opts() + local alerts = {} + local should_alert = false + + -- Deprecated options + if vim.g.rose_pine_bold_vertical_split_line ~= nil then + should_alert = true + table.insert(alerts, 'vim.g.rose_pine_bold_vertical_split_line renamed to bold_vert_split') + end + + if vim.g.rose_pine_inactive_background ~= nil then + should_alert = true + table.insert(alerts, 'vim.g.rose_pine_inactive_background renamed to dim_nc_background') + end + + if vim.g.rose_pine_disable_background ~= nil then + should_alert = true + table.insert(alerts, 'vim.g.rose_pine_disable_background renamed to disable_background') + end + + if vim.g.rose_pine_disable_float_background ~= nil then + should_alert = true + table.insert( + alerts, + 'vim.g.rose_pine_disable_float_background renamed to disable_float_background' + ) + end + + if vim.g.rose_pine_disable_italics ~= nil then + should_alert = true + table.insert(alerts, 'vim.g.rose_pine_disable_italics renamed to disable_italics') + end + + if vim.g.rose_pine_colors ~= nil then + should_alert = true + table.insert(alerts, 'vim.g.rose_pine_colors renamed to groups') + end + + if should_alert then + local prefix = ' ' + print('Rosé Pine – https://github.com/rose-pine/neovim') + print(prefix .. 'vim.g.rose_pine_