Skip to content

Commit

Permalink
Replace Monokai color scheme
Browse files Browse the repository at this point in the history
See Issue: #32 - Breaking Change - New color scheme
Replace Monokai with Monokai Pro color scheme
  • Loading branch information
brainfucksec committed Feb 1, 2025
1 parent 383674b commit bc7af80
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 31 deletions.
56 changes: 37 additions & 19 deletions nvim/lua/core/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
-- Color schemes configuration file
-----------------------------------------------------------

-- See: https://github.com/brainfucksec/neovim-lua#appearance

--[[
Set Neovim UI color scheme.
Current available color schemes: onedark, kanagawa, monokai, rose-pine.
Current available color schemes: onedark, kanagawa, monokai-pro, rose-pine.
See: https://github.com/brainfucksec/neovim-lua#appearance
Insert preferred color scheme in the `color_scheme` variable.
Color scheme is loaded at "Load color scheme" after settings sections, setup
Note: Color scheme is loaded in the "Load color scheme" section below, setup
must be called before loading.
--]]
local status_ok, color_scheme = pcall(require, 'onedark')
Expand All @@ -18,57 +17,76 @@ if not status_ok then
end

--[[
Color scheme settings:
For changes to the color scheme refer to the project instructions,
Color schemes settings:
For configuration of the color scheme refer to the project instructions,
usually found in the README file of the git package.
--]]

-- OneDark
-- https://github.com/navarasu/onedark.nvim/?tab=readme-ov-file#configuration
require('onedark').setup {
require('onedark').setup({
-- styles: dark, darker, cool, deep, warm, warmer, light
style = 'darker',
-- Custom Highlights
colors = { fg = '#b2bbcc' }, -- override default: #a0a8b7

-- Change code style ---
-- Options are italic, bold, underline, none
-- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold'
code_style = {
comments = 'none',
keywords = 'bold',
functions = 'bold',
strings = 'none',
variables = 'none'
},
}
})

-- Kanagawa
-- https://github.com/rebelot/kanagawa.nvim#configuration
require('kanagawa').setup {
require('kanagawa').setup({
undercurl = false, -- disable undercurl
commentStyle = { italic = false },
keywordStyle = { italic = false },
statementStyle = { bold = false },
functionStyle = { bold = true },
keywordStyle = { italic = false, bold = true },
statementStyle = { bold = true },
typeStyle = {},
colors = { -- add/modify theme and palette colors
palette = {},
theme = { wave = {}, lotus = {}, dragon = {}, all = {} },
},
overrides = function(colors) -- add/modify highlights
return {}
end,
theme = "wave", -- Load "wave" theme when 'background' option is not set
background = { -- map the value of 'background' option to a theme
dark = "wave", -- try "dragon" !
light = "lotus"
},
}
})

-- Monokai Pro
-- https://github.com/loctvl842/monokai-pro.nvim?tab=readme-ov-file#-configuration
require('monokai-pro').setup({
styles = {
comment = { italic = false },
keyword = { italic = true }, -- any other keyword
type = { italic = false }, -- (preferred) int, long, char, etc
storageclass = { italic = true }, -- static, register, volatile, etc
structure = { italic = false }, -- struct, union, enum, etc
parameter = { italic = false }, -- parameter pass in function
annotation = { italic = true },
tag_attribute = { italic = true }, -- attribute of tag in reactjs
},
})


--[[
Load color scheme:
Note: The instruction to load the color scheme may vary depending on the
package.
See the README of the color scheme (i.e. git package) for information, for
example: require('color_scheme').setup{}, vim.cmd('color_scheme')
See the README of the related color scheme (i.e. git package) for information,
Examples: require('color_scheme').setup{}, vim.cmd('color_scheme')
--]]
--]]
require('onedark').load()
--vim.cmd("colorscheme kanagawa")
--require('monokai').setup {}
--vim.cmd("colorscheme monokai-pro")
--vim.cmd("colorscheme rose-pine")

195 changes: 183 additions & 12 deletions nvim/lua/core/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
-- Plugin manager configuration file
-----------------------------------------------------------

-- Plugin manager: lazy.nvim
-- Plugin: lazy.nvim
-- URL: https://github.com/folke/lazy.nvim
-- https://lazy.folke.io/
-- Documentation: https://lazy.folke.io/

--[[
For information about installed plugins see the README:
neovim-lua/README.md: Plugins
https://github.com/brainfucksec/neovim-lua?tab=readme-ov-file#plugins
For information about installed plugins on neovim-lua see:
neovim-lua/#plugins: https://github.com/brainfucksec/neovim-lua?tab=readme-ov-file#plugins
For details about lazy.nvim configuration, see: https://lazy.folke.io/configuration
--]]

-- Bootstrap lazy.nvim
Expand Down Expand Up @@ -37,6 +38,46 @@ end

-- Start setup
lazy.setup({
defaults = {
-- Set this to `true` to have all your plugins lazy-loaded by default.
-- Only do this if you know what you are doing, as it can lead to unexpected behavior.
lazy = false, -- should plugins be lazy-loaded?
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = nil, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
-- default `cond` you can use to globally disable a lot of plugins
-- when running inside vscode for example
cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil
},
-- leave nil when passing the spec as the first argument to setup()
--spec = nil, ---@type LazySpec
local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec.
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
---@type number? limit the maximum amount of concurrent tasks
concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil,
git = {
-- defaults for the `Lazy log` command
-- log = { "--since=3 days ago" }, -- show commits from the last 3 days
log = { "-8" }, -- show the last 8 commits
timeout = 120, -- kill processes that take more than 2 minutes
url_format = "https://github.com/%s.git",
-- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version,
-- then set the below to false. This should work, but is NOT supported and will
-- increase downloads a lot.
filter = true,
-- rate of network related git operations (clone, fetch, checkout)
throttle = {
enabled = false, -- not enabled by default
-- max 2 ops every 5 seconds
rate = 2,
duration = 5 * 1000, -- in ms
},
-- Time in seconds to wait before running fetch again for a plugin.
-- Repeated update/check operations will not run again until this
-- cooldown period has passed.
cooldown = 0,
},
pkg = {
enabled = true,
cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua",
Expand All @@ -55,23 +96,153 @@ lazy.setup({
root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/",
},
ui = {
-- a number <1 is a percentage., >1 is a fixed size
size = { width = 0.8, height = 0.8 },
wrap = true, -- wrap the lines in the ui
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
border = "none",
-- The backdrop opacity. 0 is fully opaque, 100 is fully transparent.
backdrop = 60,
title = nil, ---@type string only works when border is not "none"
title_pos = "center", ---@type "center" | "left" | "right"
-- Show pills on top of the Lazy window
pills = true, ---@type boolean
icons = {
cmd = "",
config = "",
debug = "",
event = "",
favorite = "",
ft = "",
init = "",
import = "",
keys = "",
lazy = "󰒲 ",
loaded = "",
not_loaded = "",
plugin = "",
runtime = "",
require = "󰢱 ",
source = "",
start = "",
task = "",
list = {
"",
"",
"",
"",
},
},
-- leave nil, to automatically select a browser depending on your OS.
-- If you want to use a specific browser, you can define it here
browser = nil, ---@type string?
throttle = 1000 / 30, -- how frequently should the ui process render events
custom_keys = {
-- You can define custom key maps here. If present, the description will
-- be shown in the help menu.
-- To disable one of the defaults, set it to false.

["<localleader>l"] = {
function(plugin)
require("lazy.util").float_term({ "lazygit", "log" }, {
cwd = plugin.dir,
})
end,
desc = "Open lazygit log",
},

["<localleader>i"] = {
function(plugin)
Util.notify(vim.inspect(plugin), {
title = "Inspect " .. plugin.name,
lang = "lua",
})
end,
desc = "Inspect Plugin",
},

["<localleader>t"] = {
function(plugin)
require("lazy.util").float_term(nil, {
cwd = plugin.dir,
})
end,
desc = "Open terminal in plugin dir",
},
},
},
-- Output options for headless mode
headless = {
-- show the output from process commands like git
process = true,
-- show log messages
log = true,
-- show task start/end
task = true,
-- use ansi colors
colors = true,
},
diff = {
-- diff command <d> can be one of:
-- * browser: opens the github compare view. Note that this is always mapped to <K> as well,
-- so you can have a different command for diff <d>
-- * git: will run git diff and open a buffer with filetype git
-- * terminal_git: will open a pseudo terminal with git diff
-- * diffview.nvim: will open Diffview to show the diff
cmd = "git",
},
checker = {
-- automatically check for plugin updates
enabled = false,
concurrency = nil, ---@type number? set to 1 to check for updates very slowly
notify = true, -- get a notification when new updates are found
frequency = 3600, -- check for updates every hour
check_pinned = false, -- check for pinned packages that can't be updated
},
change_detection = {
-- automatically check for config file changes and reload the ui
enabled = true,
notify = true, -- get a notification when changes are found
},
-- lazy can generate helptags from the headings in markdown readme files,
-- so :help works even for plugins that don't have vim docs.
-- when the readme opens with :help it will be correctly displayed as markdown
readme = {
enabled = true,
root = vim.fn.stdpath("state") .. "/lazy/readme",
files = { "README.md", "lua/**/README.md" },
-- only generate markdown helptags for plugins that don't have docs
skip_if_doc_exists = true,
},
state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
-- Enable profiling of lazy.nvim. This will add some overhead,
-- so only enable this when you are debugging lazy.nvim
profiling = {
-- Enables extra stats on the debug tab related to the loader cache.
-- Additionally gathers stats about all package.loaders
loader = false,
-- Track each new require in the Lazy profiling tab
require = false,
},
-- Load plugins
spec = {
--[[
Colorscheme:
Colorschemes:
The colorscheme should be available when starting Neovim.
Current available color schemes: onedark, kanagawa, monokai, rose-pine
Current available color schemes: onedark (default), kanagawa, monokai-pro, rose-pine
See: /nvim/lua/core/colors.lua
--]]

-- OneDark
{
'navarasu/onedark.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
},

-- Other color schemes:
{ 'rebelot/kanagawa.nvim', lazy = true },
{ 'tanvirtin/monokai.nvim', lazy = true },
{ 'https://github.com/rose-pine/neovim', name = 'rose-pine', lazy = true },
{ 'rebelot/kanagawa.nvim', lazy = true }, -- Kanagawa
{ 'loctvl842/monokai-pro.nvim', lazy = true }, -- Monokai Pro
{ 'https://github.com/rose-pine/neovim', name = 'rose-pine', lazy = true }, -- Rosè Pine

-- Icons
{ 'kyazdani42/nvim-web-devicons', lazy = true },
Expand Down

0 comments on commit bc7af80

Please sign in to comment.