rose-pine/neovim

github github
colors plugin
star 183
stars
alert-circle 1
open issues
users 3
subscribers
git-branch 14
forks
CREATED

2021-05-18

UPDATED

5 days ago

packer

require('packer').startup(function()
  use 'rose-pine/neovim'
end)

paq

require "paq" { 
  'rose-pine/neovim'
}

Usage

use({
    'rose-pine/neovim',
    as = 'rose-pine',
    config = function()
        -- Options (see available options below)
        vim.g.rose_pine_variant = 'base'

        -- Load colorscheme after options
        vim.cmd('colorscheme rose-pine')
    end
})

Plugins

PR's are more than welcome if your favourite plugin is missing

Rosé Pine

Rosé Pine with Neovim

Rosé Pine Moon

Rosé Pine Moon with Neovim

Rosé Pine Dawn

Rosé Pine Dawn with Neovim

Options

Options should be set before colorscheme

Interface

-- Set variant
-- Defaults to 'dawn' if vim background is light
-- @usage 'base' | 'moon' | 'dawn' | 'rose-pine[-moon][-dawn]'
vim.g.rose_pine_variant = 'base'

-- Disable italics
vim.g.rose_pine_disable_italics = false

-- Use terminal background
vim.g.rose_pine_disable_background = false

-- Use bold vertical split line
vim.g.rose_pine_bold_vertical_split_line = true

Custom colours

vim.g.rose_pine_colors = {
  punctuation = '#fa8072',
  comment = '#ffffff',
  hint = '#9745be',
  info = '#78ccc5',
  warn = '#f5c359',
  error = '#c75c6a',
}

Be sure to set the colorscheme after options

-- Set colorscheme after options
vim.cmd('colorscheme rose-pine')

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 })