Home

Awesome

<h3 align="center"> <img src="https://raw.githubusercontent.com/new-paper/newpaper/main/assets/logo/logo-newpaper.png" width="400" alt="Logo"/><br/> <a href="https://github.com/new-paper/newpaper">Newpaper</a> for <a href="https://neovim.io/">Neovim</a> </h3> <div align="center">

🎨 newpaper.nvim

Neovim Lua

</div>

ℹī¸ Info

A fork of material.nvim colorscheme for Neovim using Papercolor color palette with small changes written in Lua. $\LaTeX$ syntax highlight get from sublime-writing-color-scheme.

newpaper.nvim is meant to be a fast and modern colorscheme written in Lua that supports a lot of the new features added to Neovim like built-in LSP and TreeSitter.

Light

<div align="center"> <p align="center"> <img src="https://raw.githubusercontent.com/new-paper/newpaper/main/assets/palette/newpaper_light.svg"/> </p> <p align="center"> <img src="https://raw.githubusercontent.com/new-paper/newpaper/main/assets/previews/nvim/nvim_preview_light.png"> </p> </div>

Dark

<div align="center"> <p align="center"> <img src="https://raw.githubusercontent.com/new-paper/newpaper/main/assets/palette/newpaper_dark.svg"/> </p> <p align="center"> <img src="https://raw.githubusercontent.com/new-paper/newpaper/main/assets/previews/nvim/nvim_preview_dark.png"> </p> </div> <div align="center">

More screenshotsđŸ–ŧī¸

</div>

🌟 Features

Extra syntax highlights

LanguageCore syntaxTreesitter queriesExtra pluginsPreviewCode example
$\LaTeX$ :thumbsup::heavy_check_mark::heavy_check_mark::white_check_mark: vimtex
Comment :thumbsup::x::white_check_mark::x:đŸ–ŧī¸raw code
Gitignore:x::white_check_mark::x:
HTML:heavy_check_mark::white_check_mark::x:
Jinja:heavy_check_mark::x::white_check_mark: Vim-Jinja2-Syntax
Json:heavy_check_mark::white_check_mark::x:
Liquid:heavy_check_mark::white_check_mark::x:
Lua :thumbsup::heavy_check_mark::white_check_mark::heavy_check_mark: vim-luađŸ–ŧī¸raw code
Luadoc :thumbsup::x::white_check_mark::x:
Luap :thumbsup::x::white_check_mark::x:raw code
Luau:x::white_check_mark::x:
Markdown :thumbsup::heavy_check_mark::white_check_mark::heavy_check_mark: vim-markdownđŸ–ŧī¸raw code
Pandoc :thumbsup::heavy_check_mark::x::white_check_mark: vim-pandoc-syntaxraw code
Python:x::white_check_mark::x:
Query:x::white_check_mark::x:
Rbs :thumbsup::x::white_check_mark::heavy_check_mark: vim-rbs
Regex :thumbsup::x::white_check_mark::x:raw code
Ruby :thumbsup::heavy_check_mark::white_check_mark::heavy_check_mark: vim-rubyđŸ–ŧī¸raw code
Rust:heavy_check_mark::white_check_mark::x:raw code
TOML:heavy_check_mark::white_check_mark::x:raw code
Vim:heavy_check_mark::white_check_mark::x:
Vimdoc:heavy_check_mark::white_check_mark::x:
YAML:heavy_check_mark::white_check_mark::x:raw code

:thumbsup: - detailed, :white_check_mark: - support and recomended as default, :heavy_check_mark: - support, :x: - not support

🔌 Supported plugins

⚡ī¸ Requirements

đŸ“Ļ Installation

Install via your favorite package manager:

lazy.nvim

require("lazy").setup({
    "yorik1984/newpaper.nvim",
    priority = 1000,
    config = true,
})

⚙ī¸ Configuration

Set the desired style using:

" init.vim
lua << EOF
    require("newpaper").setup({
        style = "dark"
    })
EOF
-- Lua:
vim.g.newpaper_style = "dark"
require("newpaper").setup()

-- OR better
require("newpaper").setup({
    style = "dark"
})

đŸ’ģ Commands

CommandDescription
:NewpaperLightChange style to light mode(by default)
:NewpaperDarkChange style to dark mode

Available options

OptionDefaultDescription
style"light"The theme comes in two styles:"dark", "light"
lightness0Make all supported highlight groups lighter or darker. Useful with saturation to make more beauty and eye-friendly view. Value: from -1(all colors "#000000") to 1(all colors "#FFFFFF"). Recommended value: -0.2 - 0.2
saturation0Change color saturation of all supported highlight groups. Useful with lightness to make more beauty and eye-friendly view. Value: from -1 to 1. Recommended value: -0.2 - 0.2
greyscalefalseMake all supported highlight groups in greyscale palette. Useful with lightness and saturation to make more beauty and eye-friendly view. Value: "lightness", "average", "luminosity", false. Recommended greyscale value: "luminosity"
editor_better_viewtrueMake some interface like menu, title of editor and plugins menu bold and italic
terminal"contrast"Make :terminalbuffers and windows in different styles. Value:"bg", "contrast", "inverse", "inverse_transparent"
sidebars_contrast{}Set a contrast background on sidebar-like windows. Example: { "NvimTree", "vista_kind", "Trouble" }. "NvimTree" and "Trouble" groups has own highlight colors. Can be overridden separate from others sidebars
contrast_floattrueMake popup menus like nvim-cmp, lsp-saga have a different foreground and background
contrast_telescopetrueMake Telescope have a different foreground and background
operators_boldtrueMake booleans, escape characters, operators like =, /, *, +, -, &, %, #, ~, <, >, `
delimiters_boldfalseMake delimiter ,,;,:,. bold
brackets_boldfalseMake brackets like {}, (), [] bold
delim_rainbow_boldfalseMake rainbow delimiters like {}, (), [] or others bold. Use specific plugin to highlight like rainbow-delimiters.nvim
booleans"bold"Make booleans like true, false etc. bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE"
keywords"bold"Make keywords like if, for, while etc. bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE"
doc_keywords"bold,italic"Make documenting keywords like @param, @return etc. bold, italic or NONE. Value: "bold", "italic", "bold,italic", "NONE". Only support for: treesitter-luadoc
regex"bold"Make regex bold, italic or NONE. Value: "bold", "italic", "bold,italic", "NONE"
regex_bgtrueEnable background color for regex capturing groups
tags"bold"Make HTML tag bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE"
tags_brackets_boldtrueMake tags delimiters like < or /> bold
tex_major"bold"Make only major tex word like\documentclass, \section, â€Ļ bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE". Work only with vimtex
tex_operators_bold"true"Make tex operators bold
tex_brackets_bold"false"Make tex brackets like {}, [] bold
tex_math_delim_bold"false"Make tex math delimiters like \[\], \(\), $ $, $$ $$ bold
tex_keywords"NONE"Make other tex keywords bold, italic or NONE. Value: "bold", "italic", "bold,italic", "NONE"
tex_zone"italic"Make some tex ...Zone... bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE"
tex_arg"italic"Make some tex ...Arg... bold, italic, or NONE. Value: "bold", "italic", "bold,italic", "NONE"
error_highlight"undercurl"Make spell or tex-files errors highlighting with background, undercurl, both or NONE. Value: "bg", "undercurl", "both", "NONE"
italic_stringstrueMake strings italic
italic_commentstrueMake comments italic
italic_doc_commentstrueMake comments documenting code italic
italic_functionsfalseMake function calls and names italic
italic_variablesfalseMake variable names and identifiers italic
borderstrueEnable the border between vertically split windows visible
disable_backgroundfalseDisable the setting of background color so that Neovim can use your terminal background
lsp_virtual_text_bgtrueEnable background color for LSP virtual text
hide_eobfalseHide the end of buffer lines (~)
colors{}Override the default colors and use your own. Also, override lualine colors if you have same name for more good view. See possible value in sorce code colors.lua[12:189] and colors.lua[193:370]
colors_advanced{}Override the advanced default colors and use your own. See possible value in source code colors.lua[392:556]
custom_highlights{}Override the default and plugins highlights groups. Table predefine any syntax colors. Use fg,bg, sp, style style options. fg => guifg, bg => guibg, sp => guisp, style => gui. See above
lualine_boldtrueWhen true, section headers in the lualine theme will be bold
lualine_style"light"Set different style from main theme:"dark", "light"
devicons_custom{}Set devicons custom color(override all icons by one color). Use gui, cterm or both options: gui = "#HEX_COLOR", cterm = NUMBER

Colorscheme default settings

-- Default settings
require("newpaper").setup({
    style               = "light",
    lightness           = 0,
    saturation          = 0,
    greyscale           = false,
    editor_better_view  = true,
    terminal            = "contrast",
    sidebars_contrast   = {},
    contrast_float      = true,
    contrast_telescope  = true,
    operators_bold      = true,
    delimiters_bold     = false,
    brackets_bold       = false,
    delim_rainbow_bold  = false,
    booleans            = "bold",
    keywords            = "bold",
    regex               = "bold",
    regex_bg            = true,
    tags                = "bold",
    tags_brackets_bold  = true,
    tex_major           = "bold",
    tex_operators_bold  = true,
    tex_brackets_bold   = false,
    tex_math_delim_bold = false,
    tex_keywords        = "NONE",
    tex_zone            = "italic",
    tex_arg             = "italic",
    error_highlight     = "undercurl",
    italic_strings      = true,
    italic_comments     = true,
    italic_doc_comments = true,
    italic_functions    = false,
    italic_variables    = false,
    borders             = true,
    disable_background  = false,
    lsp_virtual_text_bg = true,
    hide_eob            = false,
    colors              = {},
    colors_advanced     = {},
    custom_highlights   = {},
    lualine_bold        = true,
    lualine_style       = "light",
    devicons_custom     = {},
})

Colorscheme customizing

-- Example config in lua with global variables
vim.g.newpaper_style             = "dark"
vim.g.newpaper_keywords          = "italic"
vim.g.newpaper_borders           = false
vim.g.newpaper_colors            = { teal = "#0000FF" }
vim.g.newpaper_colors_advanced   = { keyword = "#AA00AA", string = "#008800" }
vim.g.newpaper_custom_highlights = {
    Float     = { fg = vim.g.newpaper_colors.teal },
    Number    = { fg = "#00FF00" },
    rubyClass = { fg = "#00FFF0" },
    Comment   = { fg = "#FF0000", style = "italic,underline" }
}
require("newpaper").setup()

-- OR better with user configuration
local colors            = { teal = "#0000FF" } -- use one color for many groups
local colors_advanced   = { keyword = "#AA00AA", string = "#008800" }
local custom_highlights = {
    Float     = { fg = colors.teal }, -- prefer override by name
    Number    = { fg = "#00FF00" },   -- but hex colos also good
    rubyClass = { fg = "#00FFF0" },
    Comment   = { fg = "#FF0000", style = "italic,underline" },
}
require("newpaper").setup({
    style    = "dark",
    keywords = "italic",
    -- ...
    colors              = colors,
    colors_advanced     = colors_advanced,
    custom_highlights   = custom_highlights,
    -- ...
    devicons_custom     = { gui = "#FFFF00", cterm = 3},
})
" init.vim
lua << EOF
    require("newpaper").setup({
        style    = "dark",
        keywords = "italic",
        borders  = false,
        colors   = { black = "#000000", bg = "#0F111A" }
    })
EOF

⚠ī¸guicursor customizing

-- guicursor advansed settigs:
-- colorsheme predefine colors for various cursors type:
{
    Cursor       = { fg = newpaper.bg, bg = newpaper.cursor },     -- Character under the cursor
    nCursor      = { fg = newpaper.bg, bg = newpaper.teal },       -- Normal mode
    vCursor      = { fg = newpaper.bg, bg = newpaper.purple },     -- Visual mode
    veCursor     = { fg = newpaper.bg, bg = newpaper.darkpurple }, -- Visual mode with "selection" "exclusive" (same as "v", if not specified)
    oCursor      = { fg = newpaper.bg, bg = newpaper.navy },       -- Operator-pending mode
    iCursor      = { fg = newpaper.bg, bg = newpaper.green },      -- Insert mode
    rCursor      = { fg = newpaper.bg, bg = newpaper.magenta },    -- Replace mode
    cCursor      = { fg = newpaper.bg, bg = newpaper.darkorange }, -- Command-line Normal (append) mode
    ciCursor     = { fg = newpaper.bg, bg = newpaper.darkorange }, -- Command-line Insert mode
    crCursor     = { fg = newpaper.bg, bg = newpaper.darkorange }, -- Command-line Replace mode
    smCursor     = { fg = newpaper.bg, bg = newpaper.yellow },     -- showmatch in Insert mode
    TermCursor   = { fg = newpaper.bg, bg = newpaper.cursor },     -- active cursor in terminal
    TermCursorNC = { fg = newpaper.bg, bg = newpaper.lightgrey },  -- inactive cursor in terminal
}
-- This colors cam be using or overriding by own colors. See above.

-- init.lua example
vim.o.guicursor = "n:block-nCursor,v:block-vCursor,i:ver25-iCursor,r:hor25-rCursor,c:ver25-cCursor"

For more information see in :h guicursor

🎨 Lualine theme

Enable the newpaper theme for Lualine:

require("lualine").setup({
    options = {
        -- ... your lualine config
    },
    -- example config of sections
    sections = {
        lualine_b = {
            {
                "diff",
                diff_color = {
                -- specific colors from theme with bg color of section
                    added    = "GitSignsAdd",
                    modified = "GitSignsChange",
                    removed  = "GitSignsDelete",
                },
                symbols = {
                    added    = "ī‘— ",
                    modified = "ī‘™ ",
                    removed  = "ī‘˜ ",
                },
            },
        },
        lualine_x = {
            {
                "diagnostics",
                sources = { "nvim_diagnostic" },
                sections = { "error", "warn", "info", "hint" },
                diagnostics_color = {
                -- specific colors from theme with bg color of section
                    error = "LualineDiagnosticError",
                    warn  = "LualineDiagnosticWarn",
                    info  = "LualineDiagnosticInfo",
                    hint  = "LualineDiagnosticHint",
                },
                symbols = {
                    error = "îĒ‡ ",
                    warn = "îŠŦ ",
                    info = " ",
                    hint = "ī ĩ ",
                },
            },
        },
    }
})

Lualine theme name and style automatically using from main theme

⚙ī¸ Hint

You can temporally use just only lualine theme with any others colorschemes. It also depends on vim.o.background.

-- Set bold style
vim.g.newpaper_lualine_bold = true
-- If you want to enable style like in main colorscheme no need to set style of lualine
vim.g.newpaper_lualine_style = "light"
-- Also you can predefine colors
vim.g.newpaper_colors        = { teal = "#008080" }

-- disable main theme
-- require("newpaper").setup()

-- enable other colorscheme
-- ...

⚠ī¸ More recommended configuration here: yorik1984/lualine-theme.nvim

đŸ“ē Screenshots lualine

light

newpaper-light-normal newpaper-light-insert newpaper-light-visual newpaper-light-v_line newpaper-light-replace newpaper-light-command

dark

newpaper-dark-normal newpaper-dark-insert newpaper-dark-visual newpaper-dark-v_line newpaper-dark-v_block newpaper-dark-replace newpaper-dark-command

đŸ“ē Screenshots

đŸŽŧ Languages

RUBY

Source code HERE

Treesitter

treesitter

vim-ruby

vim-ruby

LUA

Source code HERE

Treesitter treesitter

vim-lua vim-lua

MARKDOWN

Source code HERE

vim and Treesitter treesitter

COMMENT-TODO

Source code HERE

Treesitter treesitter

🎛ī¸ Plugins

todo-comments.nvim

Source code HERE

todo-comments

Example config:
{
    keywords = {
        FIX =  { icon = "ī†ˆ", alt = { "FIXME", "BUG", "FIXIT", "ISSUE", "ERROR" } },
        TODO = { icon = "ī€Œ", alt = { "WIP" } },
        HACK = { icon = "ī’" },
        WARN = { icon = "īą" },
        PERF = { icon = "ī€—" },
        NOTE = { icon = "ķ°Žž", alt = { "INFO", "DOCS" } },
        TEST = { icon = "ī‚…" },
    },
    highlight = {
        multiline = true,
        keyword   = "bg",
        after     = "fg",
    },
}

❔ FAQ

For a complete guide on usage and Configuration of the theme, see :help newpaper.nvim.

Extras

Extra config with newpaper-based color palette for some terminal and GUI application.

Šī¸ Credits

🛠ī¸ TODO