Awesome Open Source
Awesome Open Source


Neovim Lua

The original Material theme now available for NeoVim


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



  • Neovim >= 0.7.0


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'


Enable the colorscheme:

colorscheme material
vim.cmd 'colorscheme material'

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


  • 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 = {
		sidebars = false, -- Enable contrast for sidebar-like windows ( for example Nvim-Tree )
		floating_windows = false, -- Enable contrast for floating windows
		line_numbers = false, -- Enable contrast background for line numbers
		sign_column = false, -- Enable contrast background for the sign column
		cursor_line = false, -- Enable darker background for the cursor line
		non_current_windows = false, -- Enable darker background for non-current windows
		popup_menu = false, -- Enable lighter background for the popup menu

	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_filetypes = { -- Specify which filetypes get the contrasted (darker) background
		"terminal", -- Darker terminal background
		"packer", -- Darker packer background
		"qf" -- Darker qf list background

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

	disable = {
		colored_cursor = false, -- Disable the colored cursor
		borders = false, -- Disable borders between verticaly split windows
		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

	lualine_style = "default", -- Lualine style ( can be 'stealth' or 'default' )

	async_loading = true, -- Load parts of the theme asyncronously for faster startup (turned on by default)

	custom_highlights = {} -- Overwrite highlights with your own

	plugins = { -- Here, you can disable(set to false) plugins that you don't use or don't want to apply the theme to
		trouble = true,
		nvim_cmp = true,
		neogit = true,
		gitsigns = true,
		git_gutter = true,
		telescope = true,
		nvim_tree = true,
		sidebar_nvim = true,
		lsp_saga = true,
		nvim_dap = true,
		nvim_navic = true,
		which_key = true,
		sneak = true,
		hop = true,
		indent_blankline = true,
		nvim_illuminate = true,
		mini = true,

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 = {
		LineNr = { bg = '#FF0000' }
		CursorLine = { fg = '#0000FF', underline = true },

		-- This is a list of possible values
		YourHighlightGroup = {
			fg = "#SOME_COLOR", -- foreground color
			bg = "#SOME_COLOR", -- background color
			sp = "#SOME_COLOR", -- special color (for colored underlines, undercurls...)
			bold = false, -- make group bold
			italic = false, -- make group italic
			underline = false, -- make group underlined
			undercurl = false, -- make group undercurled
			underdot = false, -- make group underdotted
			underdash = false -- make group underdotted
			striketrough = false, -- make group striked trough
			reverse = false, -- reverse the fg and bg colors
			link = "SomeOtherGroup" -- link to some other highlight group

To enable the lualine themes, first set the theme in your lualine settings to auto or material

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

Then, choose the style trough a variable called lualine_style in the theme setup function

	lualine_style = 'default' -- the default style
	lualine_style = 'stealth' -- the stealth style

If the theme, doesn't look right, it's probably because material.nvim is being loaded before lualine, causing the other material theme that comes built-in to lualine to be used. To fix this, either load material.nvim after lualine (preferred way) or set the lualine theme to one of these two values in your lualine settings

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


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

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Lua (34,573
Material (15,969
Neovim (4,125
Color Scheme (3,000
Tree Sitter (208
Neovim Lua (107