Skip to content

Commit

Permalink
Update documentation and config files
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-M committed Feb 10, 2024
1 parent c3b1ee2 commit 554b012
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ require("monokai-pro").setup({
},
---@param c Colorscheme
override = function(c) end,
---@param cs Colorscheme
---@param p ColorschemeOptions
---@param Config MonokaiProOptions
---@param hp Helper
override = function(cs: Colorscheme, p: ColorschemeOptions, Config: MonokaiProOptions, hp: Helper) end,
})
```

Expand Down Expand Up @@ -251,7 +256,7 @@ require('barbecue').setup {
let g:lightline = {'colorscheme': 'monokaipro'}
```

- Override function:
- Override function for customizing the final color scheme:

```lua
require("monokai-pro").setup({
Expand All @@ -265,9 +270,9 @@ require("monokai-pro").setup({
})
```

- Custom your own palette:
- Customize your own palette:

This is a sample config to customize `Tokyonight` palette:
This is a sample config to use `Tokyonight` as the palette:

```lua
require("monokai-pro").setup({
Expand Down Expand Up @@ -301,6 +306,26 @@ require("monokai-pro").setup({
})
```

- Customize the scheme:

This is a sample config to use a darker background for almost all supported plugins:

```lua
require("monokai-pro").setup({
-- ...
overrideScheme = function(cs, p, config, hp)
local cs_override = {}
local calc_bg = hp.blend(p.background, 0.75, '#000000')

cs_override.editor = {
background = calc_bg,
}
return cs_override
end
-- ...
})
```

## 🔧 Command

- run command `MonokaiProSelect` to launch a menu to choose theme filter (required: [nui.nvim](https://github.com/MunifTanjim/nui.nvim))
Expand Down
1 change: 1 addition & 0 deletions lua/monokai-pro/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local util = require("monokai-pro.util")
---@field plugins? PluginConfig
---@field override? fun(c: Colorscheme)
---@field overridePalette? fun(filter: Filter) A function to override palette
---@field overrideScheme? fun(cs: Colorscheme, p: ColorschemeOptions, Config: MonokaiProOptions, hp: Helper) A function to override scheme
local config = {
transparent_background = false,
terminal_colors = true,
Expand Down

0 comments on commit 554b012

Please sign in to comment.