All Projects β†’ marko-cerovac β†’ material.nvim

marko-cerovac / material.nvim

Licence: GPL-2.0 license
πŸ”± Material colorscheme for NeoVim written in Lua with built-in support for native LSP, TreeSitter and many more plugins

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to material.nvim

zephyr-nvim
A dark neovim colorscheme written in lua
Stars: ✭ 196 (-65.85%)
Mutual labels:  colorscheme, treesitter
aurora
24-bit dark theme for (Neo)vim. Optimized for treesitter, LSP.
Stars: ✭ 141 (-75.44%)
Mutual labels:  colorscheme, treesitter
nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (-71.6%)
Mutual labels:  colorscheme, treesitter
nightfox.nvim
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
Stars: ✭ 1,489 (+159.41%)
Mutual labels:  colorscheme, treesitter
vim-lighthaus
A Lighthaus theme for (n)vim, vim-airline and lightline
Stars: ✭ 33 (-94.25%)
Mutual labels:  colorscheme, treesitter
boo-colorscheme-nvim
Boo is a colorscheme for Neovim with handcrafted support for LSP, Treesitter.
Stars: ✭ 62 (-89.2%)
Mutual labels:  colorscheme, treesitter
Comment.nvim
🧠 πŸ’ͺ // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
Stars: ✭ 796 (+38.68%)
Mutual labels:  neovim-lua, treesitter
vscode.nvim
Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
Stars: ✭ 362 (-36.93%)
Mutual labels:  colorscheme, treesitter
awesome-neovim
Awesome Configurations for C/C++,Zig,Web and Lua development in NeoVim
Stars: ✭ 54 (-90.59%)
Mutual labels:  neovim-lua, treesitter
neon
Customizable coloscheme with dark and light options, vivid colors and easy on the eye.
Stars: ✭ 100 (-82.58%)
Mutual labels:  colorscheme, treesitter
diffview.nvim
Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Stars: ✭ 1,472 (+156.45%)
Mutual labels:  neovim-lua
kakoune-colors
Color schemes for kakoune
Stars: ✭ 15 (-97.39%)
Mutual labels:  colorscheme
which-key.nvim
πŸ’₯ Create key bindings that stick. WhichKey is a lua plugin for Neovim 0.5 that displays a popup with possible keybindings of the command you started typing.
Stars: ✭ 2,043 (+255.92%)
Mutual labels:  neovim-lua
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+36.06%)
Mutual labels:  treesitter
cosme.vim
Cosmetic color scheme for Vim
Stars: ✭ 63 (-89.02%)
Mutual labels:  colorscheme
Theme-Engine
Theme-Engine is usually made for modification & customization, so you can make trunks even more Colourful and better your Termux.
Stars: ✭ 31 (-94.6%)
Mutual labels:  colorscheme
sourcerer.vim
vim colorscheme
Stars: ✭ 42 (-92.68%)
Mutual labels:  colorscheme
ImageColorizer
Make any wallpaper fit any terminal colorscheme.
Stars: ✭ 80 (-86.06%)
Mutual labels:  colorscheme
blossom.vim
a simple pinkish vim colorscheme designed for cursive italics
Stars: ✭ 18 (-96.86%)
Mutual labels:  colorscheme
Turtles
🐒 A vim colorscheme based off the legendary teenage warriors
Stars: ✭ 43 (-92.51%)
Mutual labels:  colorscheme

material.nvim

Neovim Lua

The original Material theme now available for NeoVim


πŸ”± 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

🌊 Features

⚑️ Requirements

  • Neovim >= 0.7.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:

"Vim-Script:
colorscheme material
--Lua:
vim.cmd 'colorscheme material'

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:

"Vim-Script:
let g:material_style = "darker"
--Lua:
vim.g.material_style = "deep ocean"

The configuration of different options is done trough a setup function

lua << EOF
require('material').setup()
EOF

This is an example of the function with the default values

require('material').setup({

	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)

require('material').setup{
	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'
    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

  • Toggle the style live without the need to exit NeoVim

toggle_style

Just call the function for style switching

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

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

"Vim-Script:
nnoremap <leader>mm :lua require('material.functions').toggle_style()<CR>
--Lua:
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

"Vim-Script
: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

"Vim-Script:
nnoremap <leader>me :lua require('material.functions').toggle_eob()<CR>
--Lua:
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")
"Vim-Script:
: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

"Vim-Script:
nnoremap <leader>ml :lua require('material.functions').change_style('lighter')<CR>
nnoremap <leader>md :lua require('material.functions').change_style('darker')<CR>
--Lua:
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 })
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].