mirror of
https://github.com/maxmx03/solarized.nvim.git
synced 2026-09-10 07:26:26 -04:00
Merge pull request #97 from iton0/main
feat: add enabled field for styles class
This commit is contained in:
commit
5c9c2a45b4
|
|
@ -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
|
||||
|
|
@ -89,6 +90,7 @@ return {
|
|||
symbol = false,
|
||||
},
|
||||
styles = {
|
||||
enabled = true,
|
||||
types = {},
|
||||
functions = {},
|
||||
parameters = {},
|
||||
|
|
|
|||
|
|
@ -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