github github
treesitter-colorschemes plugin
star 289
alert-circle 0
open issues
users 4
git-branch 31



14 days ago


  use 'marko-cerovac/material.nvim'


require "paq" { 

🌊 material.nvim


🔱 Info

A port of Material colorscheme for NeoVim written in Lua

Material.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

If you want the old version that uses colorbuddy.nvim, you can find it here

✨ Features

  • 5 styles to choose from

    • Deep ocean deep-ocean

    • Oceanic oceanic

    • Palenight palenight

    • Lighter lighter

    • Darker darker

⚡️ Requirements

  • Neovim >= 0.5.0

⚓ Installation

Install via your favourite package manager:

" If you are using Vim-Plug
Plug 'marko-cerovac/material.nvim'
-- If you are using Packer
use 'marko-cerovac/material.nvim'

🐬 Usage

Enable the colorscheme:

colorscheme material

To enable the material-nvim theme for Lualine, simply specify it in your lualine settings: ( make sure to set the theme to 'material-nvim', as 'material' already exists built in to lualine)

require('lualine').setup {
  options = {
    -- ... your lualine config
    theme = 'material-nvim'
    -- ... your lualine config

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

⚙️ Configuration

  • There are 5 different styles available:
    • darker
    • lighter
    • oceanic
    • palenight
    • deep ocean

Set the desired style using:

let g:material_style = 'darker'
vim.g.material_style = "deep ocean"

The configuration of different options is done trough a setup function

lua << EOF

This is an example of the function with the default values


    contrast = true, -- Enable contrast for sidebars, floating windows and popup menus like Nvim-Tree
    borders = false, -- Enable borders between verticaly split windows

    popup_menu = "dark", -- Popup menu style ( can be: 'dark', 'light', 'colorful' or 'stealth' )

    italics = {
        comments = false, -- Enable italic comments
        keywords = false, -- Enable italic keywords
        functions = false, -- Enable italic functions
        strings = false, -- Enable italic strings
        variables = false -- Enable italic variables

    contrast_windows = { -- Specify which windows get the contrasted (darker) background
        "terminal", -- Darker terminal background
        "packer", -- Darker packer background
        "qf" -- Darker qf list background

    text_contrast = {
        lighter = false, -- Enable higher contrast text for lighter style
        darker = false -- Enable higher contrast text for darker style

    disable = {
        background = false, -- Prevent the theme from setting the background (NeoVim then uses your teminal background)
        term_colors = false, -- Prevent the theme from setting terminal colors
        eob_lines = false -- Hide the end-of-buffer lines

    custom_highlights = {} -- Overwrite highlights with your own

After passing the configuration to a setup function, make sure to enable the colorscheme:

colorscheme material
vim.cmd[[colorscheme material]]

This is an example of overwriting the default highlights (most users will never need to do this):

    custom_highlights = {
        CursorLine = '#0000FF',
        LineNr = '#FF0000'

⛵ Functions

  • Toggle the style live without the need to exit NeoVim


Just call the function for style switching

:lua require('material.functions').toggle_style()
"This command toggles the style

The command can also be mapped to a key for fast style switching

nnoremap <leader>mm :lua require('material.functions').toggle_style()<CR>
vim.api.nvim_set_keymap('n', '<leader>mm', [[<Cmd>lua require('material.functions').toggle_style()<CR>]], { noremap = true, silent = true })
  • Toggle the end of buffer lines ( ~ )

Call the built in function for toggling buffer lines

:lua require('material.functions').toggle_eob()
"This command toggles the end of buffer lines

The command can also be mapped to a key to toggle the lines live

nnoremap <leader>me :lua require('material.functions').toggle_eob()<CR>
vim.api.nvim_set_keymap('n', '<leader>me', [[<Cmd>lua require('material.functions').toggle_eob()<CR>]], { noremap = true, silent = true })
  • Change the style to a desired one using the function change_style("desired style")
    :lua require('material.functions').change_style("palenight")
    "This command changes the style to palenight

The command can also be mapped to a key for fast style switching

nnoremap <leader>ml :lua require('material.functions').change_style('lighter')<CR>
nnoremap <leader>md :lua require('material.functions').change_style('darker')<CR>
vim.api.nvim_set_keymap('n', '<leader>ml', [[<Cmd>lua require('material.functions').change_style('lighter')<CR>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>md', [[<Cmd>lua require('material.functions').change_style('darker')<CR>]], { noremap = true, silent = true })