Skip to content

Commit

Permalink
docs: be explicit about creating highlight groups
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Jun 18, 2023
1 parent 455dfbe commit 8133c24
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,30 @@ require("onedarkpro").setup({
})
```

**Creating highlight groups**

You can also create your own highlight groups:

```lua
require("onedarkpro").setup({
highlights = {
MyNewHighlightGroup = { fg = "${red}" }
}
})
```

or, if you'd like to disable certain highlight groups:

```lua
require("onedarkpro").setup({
highlights = {
"[@lsp.type.comment]" = {}
}
})
```

> **Note**: This can be useful to prevent LSP servers from applying groups with semantic highlights
**Specifying highlight attributes by theme or background**

As with colors, highlight attributes may be specified by using the theme name or the background color. For example:
Expand Down
25 changes: 25 additions & 0 deletions doc/onedarkpro.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,31 @@ or _override_ them:
})
<

**Creating highlight groups**

You can also create your own highlight groups:

>lua
require("onedarkpro").setup({
highlights = {
MyNewHighlightGroup = { fg = "${red}" }
}
})
<

or, if you’d like to disable certain highlight groups:

>lua
require("onedarkpro").setup({
highlights = {
"[@lsp.type.comment]" = {}
}
})
<


**Note**This can be useful to prevent LSP servers from applying groups with
semantic highlights
**Specifying highlight attributes by theme or background**

As with colors, highlight attributes may be specified by using the theme name
Expand Down

0 comments on commit 8133c24

Please sign in to comment.