A pretty colorscheme for neovim written in Lua
based on the Apprentice color pattete with support for nvim-treesitter
and neovim built-in lsp
which can be enabled using setup()
function (please refer to #Usage)
The basic structure and most of the code is inspired from the gruvbox.nvim colorscheme written by Ellison Leao
Requirements - apprentice.nvim
requires the neovim v0.5
or greater to work.
Using vim-plug
Plug 'rktjmp/lush.nvim'
Plug 'adisen99/apprentice.nvim'
Using packer
use {"adisen99/apprentice.nvim", requires = {"rktjmp/lush.nvim"}}
Inside init.vim
(this does not support treesitter, built-in lsp, use the init.lua
method below or wrap it between lua << EOF ... EOF
)
set background=dark " or light if you want light mode
colorscheme apprentice
Inside init.lua
vim.o.background = "dark" -- or "light" for light mode
-- Load and setup function to choose plugin and language highlights
require('lush')(require('apprentice').setup({
plugins = {
"buftabline",
"coc",
"cmp", -- nvim-cmp
"fzf",
"gitgutter",
"gitsigns",
"lsp",
"lspsaga",
"nerdtree",
"netrw",
"nvimtree",
"neogit",
"packer",
"signify",
"startify",
"syntastic",
"telescope",
"treesitter"
},
langs = {
"c",
"clojure",
"coffeescript",
"csharp",
"css",
"elixir",
"golang",
"haskell",
"html",
"java",
"js",
"json",
"jsx",
"lua",
"markdown",
"moonscript",
"objc",
"ocaml",
"purescript",
"python",
"ruby",
"rust",
"scala",
"typescript",
"viml",
"xml"
}
}))
If you want no plugin support then use colorscheme command instead -
vim.cmd(colorscheme apprentice)
NOTE - None of the plugins or languages highlights are enabled by default, the user is free to use the setup function to select which plugin highlights or language highlights they want to load.
- Setting the Contrast (hard, medium or soft)
lua vim.g.apprentice_contrast_dark = "medium"
" or
let g:apprentice_contrast_dark = "medium"
or
lua vim.g.apprentice_contrast_light = "soft"
" or
let g:apprentice_contrast_light = "soft"
- Setting miscellaneous options
g.apprentice_hls_lspreference = "bright_yellow"
g.apprentice_hls_cursor = "bright_yellow"
g.apprentice_hls_highlight = "bright_yellow"
g.apprentice_italicize_booleans = true
g.apprentice_tabline_sel = "fg0"
}))
For more Configuration option - go to the CONFIGURATION page in the WIKI
This colorscheme is still in development and testing. Users are welcome to use it however for programming daily. In case a user spots any bugs or error especially related to the supported plugins, treesitter or built-in LSP highlight support, then they can contribute by opening an issue or by making a pull request. More plugin highlight support is also welcome.