neovim-rose-pine/readme.md
James Best edbd6c7897 Add note about adding options first
This commit adds notes to Readme about setting
configuration before the `colorscheme`. Config
wont work if not
2021-08-15 21:29:17 +01:00

5.2 KiB
Raw Blame History

Rosé Pine for Neovim

All natural pine, faux fur and a bit of soho vibes for the classy minimalist

Install

Install via your preferred package manager

-- Packer
use({ 'rose-pine/neovim', as = 'rose-pine' })

Usage

Enable rose-pine colorscheme

-- Lua
vim.cmd('colorscheme rose-pine')
" Vimscript
colorscheme rose-pine

Enable lualine plugin

-- Lua
require('lualine').setup({
    options = {
        theme = 'rose-pine'
    }
})

Plugin Support

Rosé Pine

Rosé Pine with Neovim

Rosé Pine Moon

Rosé Pine Moon with Neovim

Rosé Pine Dawn

Rosé Pine Dawn with Neovim

Options

configuration options need to be set BEFORE loading the color scheme with colorscheme rose-pine

" Vimscript
let g:rose_pine_enable_italics = 1
let g:rose_pine_variant = "moon"
let g:rose_pine_disable_background = 1
colorscheme rose-pine
-- Set variant
-- @usage 'base' | 'moon' | 'dawn' | 'rose-pine[-moon][-dawn]'
vim.g.rose_pine_variant = 'base'

-- Enable italics
vim.g.rose_pine_enable_italics = true

-- Use terminal background
-- Note: Set to true to fix any funky background colors
vim.g.rose_pine_disable_background = false

Functions

-- Toggle between the three variants
require('rose-pine.functions').toggle_variant()

-- Toggle between base and dawn
require('rose-pine.functions').toggle_variant({'base', 'dawn'})

-- Switch to specified variant
require('rose-pine.functions').select_variant('moon')

Keymaps

-- Toggle variant
vim.api.nvim_set_keymap('n', '<c-m>', [[<cmd>lua require('rose-pine.functions').toggle_variant()<cr>]], { noremap = true, silent = true })

-- Select each variant
vim.api.nvim_set_keymap('n', '<c-8>', [[<cmd>lua require('rose-pine.functions').select_variant('dawn')<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<c-9>', [[<cmd>lua require('rose-pine.functions').select_variant('moon')<cr>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<c-0>', [[<cmd>lua require('rose-pine.functions').select_variant('base')<cr>]], { noremap = true, silent = true })