mirror of
https://github.com/maxmx03/solarized.nvim.git
synced 2026-09-10 07:26:26 -04:00
feat: add enabled field for styles class
- updated README.md to reflect new option Defaults to true. If enabled is false remove all styles. Allows for easier modification for users who do not want any styles with the colorscheme.
This commit is contained in:
parent
be02e3baf6
commit
0ff0f10a31
|
|
@ -271,6 +271,13 @@ require('solarized').setup({
|
|||
})
|
||||
```
|
||||
|
||||
You can also disable all highlight group styles.
|
||||
```lua
|
||||
require('solarized').setup({
|
||||
styles = { enabled = false } },
|
||||
})
|
||||
```
|
||||
|
||||
## Config Highlights
|
||||
|
||||
The `highlights` config allows you to customize the highlights groups.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
---@field enabled? boolean
|
||||
|
||||
---@class solarized.styles
|
||||
---@field enabled? boolean
|
||||
---@field types? vim.api.keyset.highlight
|
||||
---@field functions? vim.api.keyset.highlight
|
||||
---@field parameters? vim.api.keyset.highlight
|
||||
|
|
|
|||
|
|
@ -10,6 +10,19 @@ M.config = require 'solarized.config'
|
|||
|
||||
M.setup = function(config)
|
||||
M.config = vim.tbl_deep_extend('force', M.config, config)
|
||||
|
||||
if M.config.styles.enabled == false then
|
||||
M.config.styles = {
|
||||
types = { italic = false, bold = false },
|
||||
functions = { italic = false, bold = false },
|
||||
parameters = { italic = false, bold = false },
|
||||
comments = { italic = false, bold = false },
|
||||
strings = { italic = false, bold = false },
|
||||
keywords = { italic = false, bold = false },
|
||||
variables = { italic = false, bold = false },
|
||||
constants = { italic = false, bold = false },
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
M.load = function()
|
||||
|
|
|
|||
Loading…
Reference in a new issue