material.nvim
:trident: Material colorscheme for NeoVim written in Lua with built-in support for native LSP, TreeSitter and many more plugins
Top Related Projects
🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
🍨 Soothing pastel theme for (Neo)vim
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
GitHub's Neovim themes
NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
Quick Overview
Material.nvim is a colorscheme for Neovim based on the Material Design color palette. It provides a modern and visually appealing look for your Neovim editor, with support for various plugins and customization options.
Pros
- Offers multiple style variations (Darker, Lighter, Palenight, Deep Ocean, Oceanic)
- Supports a wide range of popular Neovim plugins
- Highly customizable with options to modify colors and styles
- Includes built-in support for lualine statusline
Cons
- Requires Neovim 0.5 or higher, which may not be available on all systems
- Some users may find the default color palette too vibrant or saturated
- Limited documentation for advanced customization options
Code Examples
- Basic setup in your Neovim configuration:
vim.cmd 'colorscheme material'
- Changing the style:
vim.g.material_style = "deep ocean"
vim.cmd 'colorscheme material'
- Customizing colors:
require('material').setup({
custom_highlights = {
LineNr = { fg = '#42A5F5' },
CursorLine = { bg = '#0D47A1' }
}
})
Getting Started
To use material.nvim, follow these steps:
- Install the colorscheme using your preferred plugin manager. For example, with packer.nvim:
use 'marko-cerovac/material.nvim'
- Add the following to your Neovim configuration file (e.g.,
init.lua
):
vim.g.material_style = "deep ocean" -- Choose your preferred style
require('material').setup({
contrast = {
terminal = false,
sidebars = false,
floating_windows = false,
cursor_line = false,
non_current_windows = false,
filetypes = {},
},
styles = {
comments = { italic = true },
strings = { --[[ no style ]] },
keywords = { italic = true },
functions = { bold = true },
variables = {},
operators = {},
types = {},
},
plugins = {
-- Enable plugins as needed
"nvim-cmp",
"nvim-web-devicons",
"telescope",
"which-key",
},
disable = {
colored_cursor = false,
borders = false,
background = false,
term_colors = false,
eob_lines = false
},
high_visibility = {
lighter = false,
darker = false
},
lualine_style = "default",
async_loading = true,
custom_highlights = {},
custom_colors = {}
})
vim.cmd 'colorscheme material'
Adjust the settings as needed to customize the appearance to your liking.
Competitor Comparisons
🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
Pros of tokyonight.nvim
- More color scheme variants (storm, night, day, moon)
- Better support for various plugins and languages
- Active development with frequent updates
Cons of tokyonight.nvim
- Less customization options for individual colors
- May not have as consistent a look across different file types
Code Comparison
material.nvim:
require('material').setup({
contrast = {
sidebars = false,
floating_windows = false,
},
styles = {
comments = { italic = true },
},
})
tokyonight.nvim:
require("tokyonight").setup({
style = "storm",
light_style = "day",
transparent = false,
terminal_colors = true,
styles = {
comments = { italic = true },
},
})
Both color schemes offer easy setup with Lua configuration. material.nvim provides more granular control over contrast settings, while tokyonight.nvim offers more style variants and terminal color support. tokyonight.nvim's configuration is slightly more straightforward, but material.nvim allows for more detailed customization of specific elements.
🍨 Soothing pastel theme for (Neo)vim
Pros of Catppuccin
- Offers a wider range of color palette options (Latte, Frappe, Macchiato, Mocha)
- Provides extensive plugin support and integrations
- Active community and frequent updates
Cons of Catppuccin
- May require more configuration to achieve desired look
- Can be overwhelming for users who prefer simpler themes
Code Comparison
Material:
require('material').setup({
contrast = {
sidebars = false,
floating_windows = false,
},
styles = {
comments = { italic = true },
},
})
Catppuccin:
require("catppuccin").setup({
flavour = "mocha",
integrations = {
cmp = true,
gitsigns = true,
telescope = true,
},
})
Both themes offer easy setup and customization options. Material focuses on contrast settings and style modifications, while Catppuccin emphasizes flavor selection and plugin integrations. Catppuccin's setup allows for more granular control over various plugin integrations, potentially requiring more configuration but offering greater flexibility. Material's setup is more straightforward, with a focus on visual adjustments like contrast and text styles.
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
Pros of Nightfox
- Offers multiple color schemes (Nightfox, Dayfox, Dawnfox, Duskfox, Nordfox, Terafox, Carbonfox)
- Provides extensive customization options through Lua configuration
- Supports a wide range of plugins and integrations out of the box
Cons of Nightfox
- May have a steeper learning curve for users new to Lua-based configurations
- Some users might find the variety of options overwhelming
Code Comparison
Material:
require('material').setup({
contrast = {
sidebars = false,
floating_windows = false,
},
styles = {
comments = { italic = true },
},
})
Nightfox:
require('nightfox').setup({
options = {
styles = {
comments = "italic",
keywords = "bold",
types = "italic,bold",
}
}
})
Both color schemes offer customization through Lua setup functions. Material focuses on contrast settings and specific element styles, while Nightfox provides more granular control over various syntax elements.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
Pros of onedark.nvim
- More customization options, including the ability to change specific colors and styles
- Supports a wider range of plugins and integrations out-of-the-box
- Faster startup time due to its lightweight design
Cons of onedark.nvim
- Less visually striking than material.nvim's bold color schemes
- Fewer pre-defined color variants compared to material.nvim's extensive palette
- May require more manual configuration to achieve desired look
Code Comparison
onedark.nvim configuration:
require('onedark').setup {
style = 'dark',
transparent = true,
term_colors = true,
ending_tildes = false
}
material.nvim configuration:
vim.g.material_style = "deep ocean"
require('material').setup({
contrast = {
terminal = false,
sidebars = false,
floating_windows = false,
},
italics = {
comments = true,
keywords = false,
functions = false,
strings = false,
variables = false
}
})
Both themes offer easy setup and configuration, but material.nvim provides more granular control over specific UI elements, while onedark.nvim focuses on overall color scheme adjustments.
GitHub's Neovim themes
Pros of github-nvim-theme
- Offers a wider range of GitHub-inspired color schemes, including light and dark variants
- Provides better integration with GitHub's UI design, making it familiar for GitHub users
- Includes support for various plugins and language-specific highlighting out of the box
Cons of github-nvim-theme
- Less customization options compared to material.nvim's extensive configuration
- May not offer as cohesive a design across different file types and plugins
- Limited to GitHub-inspired themes, which might not suit all users' preferences
Code Comparison
material.nvim:
require('material').setup({
contrast = {
sidebars = false,
floating_windows = false,
},
styles = {
comments = { italic = true },
},
})
github-nvim-theme:
require('github-theme').setup({
theme_style = "dark",
function_style = "italic",
sidebars = {"qf", "vista_kind", "terminal", "packer"},
colors = {hint = "orange", error = "#ff0000"}
})
Both themes offer easy setup and configuration, but material.nvim provides more granular control over contrast and styles, while github-nvim-theme focuses on GitHub-specific elements and plugin integration.
NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
Pros of Kanagawa
- More color schemes available, including light and dark variants
- Extensive plugin support, including popular tools like Telescope and Treesitter
- Customizable color palette allowing users to tweak the theme to their liking
Cons of Kanagawa
- Less focus on Material Design principles compared to Material
- May require more configuration to achieve desired look
- Fewer pre-defined styles for specific programming languages
Code Comparison
Material:
require('material').setup({
contrast = {
sidebars = false,
floating_windows = false,
},
styles = {
comments = { italic = true },
},
})
Kanagawa:
require('kanagawa').setup({
undercurl = true,
commentStyle = { italic = true },
functionStyle = {},
keywordStyle = { italic = true},
statementStyle = { bold = true },
})
Both themes offer customization options, but Material focuses more on contrast settings, while Kanagawa provides more granular control over syntax highlighting styles.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ð± Info
A colorscheme for NeoVim that takes inspiration from the original Material theme.
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
ð Features
-
5 styles to choose from
-
Oceanic
-
Deep ocean
-
Palenight
-
Lighter
-
Darker
-
-
Many supported plugins
-
Ability to change background on sidebar-like windows like Nvim-Tree, Packer, terminal etc.
-
Asynchronous highlight loading which makes the theme blazingly fast
-
Ability to select styles using telescope.nvim
-
Added functions for live theme switching without the need to restart NeoVim
-
Two Lualine themes
-
Default:
-
Stealth
-
â¡ï¸ Requirements
- Neovim >= 0.7.0
â Installation
Install via your favourite package manager:
-- If you are using Lazy
require('lazy').setup({
'marko-cerovac/material.nvim'
}, opts)
-- If you are using Pckr
require('pckr').add({
'marko-cerovac/material.nvim'
})
ð¬ Usage
Enable the colorscheme:
--Lua:
vim.cmd 'colorscheme material'
For a complete 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:
--Lua:
vim.g.material_style = "deep ocean"
The configuration of different options is done trough a setup function
This is an example of the function with the default values
require('material').setup({
contrast = {
terminal = false, -- Enable contrast for the built-in terminal
sidebars = false, -- Enable contrast for sidebar-like windows ( for example Nvim-Tree )
floating_windows = false, -- Enable contrast for floating windows
cursor_line = false, -- Enable darker background for the cursor line
lsp_virtual_text = false, -- Enable contrasted background for lsp virtual text
non_current_windows = false, -- Enable contrasted background for non-current windows
filetypes = {}, -- Specify which filetypes get the contrasted (darker) background
},
styles = { -- Give comments style such as bold, italic, underline etc.
comments = { --[[ italic = true ]] },
strings = { --[[ bold = true ]] },
keywords = { --[[ underline = true ]] },
functions = { --[[ bold = true, undercurl = true ]] },
variables = {},
operators = {},
types = {},
},
plugins = { -- Uncomment the plugins that you use to highlight them
-- Available plugins:
-- "blink",
-- "coc",
-- "colorful-winsep",
-- "dap",
-- "dashboard",
-- "eyeliner",
-- "fidget",
-- "flash",
-- "gitsigns",
-- "harpoon",
-- "hop",
-- "illuminate",
-- "indent-blankline",
-- "lspsaga",
-- "mini",
-- "neo-tree",
-- "neogit",
-- "neorg",
-- "neotest",
-- "noice",
-- "nvim-cmp",
-- "nvim-navic",
-- "nvim-notify",
-- "nvim-tree",
-- "nvim-web-devicons",
-- "rainbow-delimiters",
-- "sneak",
-- "telescope",
-- "trouble",
-- "which-key",
},
disable = {
colored_cursor = false, -- Disable the colored cursor
borders = false, -- Disable borders between vertically split windows
background = false, -- Prevent the theme from setting the background (NeoVim then uses your terminal background)
term_colors = false, -- Prevent the theme from setting terminal colors
eob_lines = false -- Hide the end-of-buffer lines
},
high_visibility = {
lighter = false, -- Enable higher contrast text for lighter style
darker = false -- Enable higher contrast text for darker style
},
lualine_style = "default", -- Lualine style ( can be 'stealth' or 'default' )
async_loading = true, -- Load parts of the theme asynchronously for faster startup (turned on by default)
custom_colors = nil, -- If you want to override the default colors, set this to a function
custom_highlights = {}, -- Overwrite highlights with your own
})
After passing the configuration to a setup function, make sure to enable the colorscheme:
vim.cmd 'colorscheme material'
This is an example of overwriting the default highlights and colors (most users will never need to do this)
local material = require 'material'
local colors = require 'material.colors'
material.setup{
custom_highlights = {
LineNr = { bg = '#FF0000' },
CursorLine = { fg = colors.editor.constrast , underline = true },
-- Dynamically override highlight groups with functions to ensure colors are
-- updated when changing styles at runtime
TabLine = function(colors, _)
return {
fg = colors.main.gray,
italic = true,
}
end,
TabLineSel = function(_, highlights)
return vim.tbl_extend(
"force",
highlights.main_highlights.editor()["TabLineSel"],
{ bold = true }
)
end,
-- 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 underslashed
striketrough = false, -- make group striked trough
reverse = false, -- reverse the fg and bg colors
link = "SomeOtherGroup" -- link to some other highlight group
}
},
-- Custom colors must be a function that takes in the default colors table as
-- a parameter, and then modifies them.
-- To see the available colors, see lua/material/colors/init.lua
custom_colors = function(colors)
colors.editor.bg = "#SOME_COLOR"
colors.main.purple = "#SOME_COLOR"
colors.lsp.error = "#SOME_COLOR"
end
}
To enable transparency, it is suggested you disable the theme background from the settings above. That way, your terminal's background will be used instead.
require('material').setup({
-- ... other settings
disable = {
-- ... other settings
background = true,
},
})
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'
or
theme = 'material'
-- ... your lualine config
}
}
Then, choose the style trough a variable called lualine_style
in the theme setup function
require('material').setup({
lualine_style = 'default' -- the default style
or
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
or
theme = 'material-stealth' -- the stealth style
-- ... your lualine config
}
}
âµ Functions
- Use Telescope.nvim to switch styles
:lua require("material.functions").find_style()
- Cycle trough styles
:lua require('material.functions').toggle_style()
- Toggle the end of buffer lines ( ~ )
:lua require('material.functions').toggle_eob()
- Change the style to a desired one using the function change_style("desired style")
:lua require('material.functions').change_style("palenight")
Top Related Projects
🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
🍨 Soothing pastel theme for (Neo)vim
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
GitHub's Neovim themes
NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot