breaking: move to lua config (#64)

Co-authored-by: fvrests <fvrests@icloud.com>
This commit is contained in:
not 2022-02-13 16:06:19 -06:00 committed by mvllow
commit 317a7c8473
8 changed files with 648 additions and 683 deletions

View file

@ -17,7 +17,7 @@
use({
'rose-pine/neovim',
as = 'rose-pine',
tag = 'v0.*',
tag = 'v1.*',
config = function()
vim.cmd('colorscheme rose-pine')
end
@ -47,7 +47,7 @@ use({
```lua
use({
'nvim-lualine/lualine.nvim',
-- Fix mismatch palette between variants
-- fix mismatch palette between variants
event = 'ColorScheme',
config = function()
require('lualine').setup({
@ -85,68 +85,43 @@ local colors = require("galaxyline.themes.colors")["rose-pine"]
> Options should be set **before** colorscheme
```lua
-- set theme variant, matching terminal theme if unset
-- @usage 'main' | 'moon' | 'dawn'
vim.g.rose_pine_variant = ''
require('rose-pine').setup({
---@usage 'main'|'moon'
dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
---@usage string hex value or named color from rosepinetheme.com/palette
groups = {
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
vim.g.rose_pine_bold_vertical_split_line = false
vim.g.rose_pine_disable_background = false
vim.g.rose_pine_disable_float_background = false
vim.g.rose_pine_disable_italics = false
vim.g.rose_pine_inactive_background = false
error = 'love',
hint = 'iris',
info = 'foam',
warn = 'gold',
local palette = require('rose-pine.palette')
vim.g.rose_pine_colors = {
border = palette.highlight_med,
comment = palette.muted,
link = palette.iris,
punctuation = palette.subtle,
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
}
-- or set all headings at once
-- headings = '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,
-- or set all headings to one colour: `headings = palette.text`
headings = {
h1 = palette.iris,
h2 = palette.foam,
h3 = palette.rose,
h4 = palette.gold,
h5 = palette.pine,
h6 = palette.foam,
},
}
-- Set colorscheme after options
-- set colorscheme after options
vim.cmd('colorscheme rose-pine')
```
## Suggested keymaps
```lua
-- toggle between all variants
vim.keymap.set('n', '<leader>tt', require('rose-pine').toggle)
-- or toggle between some variants
vim.keymap.set('n', '<leader>tt', function() return require('rose-pine').toggle({'moon', 'dawn'}) end)
-- set variant
vim.keymap.set('n', '<leader>t1', function() return require('rose-pine').set('main') end)
vim.keymap.set('n', '<leader>t2', function() return require('rose-pine').set('moon') end)
vim.keymap.set('n', '<leader>t3', function() return require('rose-pine').set('dawn') end)
```
## Contributing
We welcome and appreciate any help in creating a lovely experience for all.