Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Feb 24, 2024
1 parent bbe6133 commit 3fbb6e8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

## :icecream: Themes

> **Note**: All bolds and italics in the screenshots below are [completely customisable](#configuring-styles). Additional screenshots of more languages can be found [here](https://github.com/olimorris/onedarkpro.nvim/issues/2#issuecomment-1937345197).
> [!NOTE]
> All bolds and italics in the screenshots below are [completely customisable](#configuring-styles). Additional screenshots of more languages can be found [here](https://github.com/olimorris/onedarkpro.nvim/issues/2#issuecomment-1937345197).
<div align="center">
<p><strong>Onedark</strong><img src="https://github.com/olimorris/onedarkpro.nvim/assets/9512444/d1e15b89-0cec-4d5b-88b8-4a0246665cb4" alt="onedark" /></p>
Expand Down Expand Up @@ -104,7 +105,8 @@ The templates for these themes can be found in the [extra](https://github.com/ol

### Default configuration

> **Note**: You only need to the call the `setup` function if you wish to change any of the defaults.
> [!NOTE]
> You only need to the call the `setup` function if you wish to change any of the defaults.
<details>
<summary>Click to see the default configuration</summary>
Expand Down Expand Up @@ -243,7 +245,8 @@ require("onedarkpro").setup({
})
```

> **Note**: See the [helpers](#rainbow-helpers) section to understand how to use the color helpers.
> [!NOTE]
> See the [helpers](#rainbow-helpers) section to understand how to use the color helpers.
These can then be used for custom highlight groups if desired:

Expand Down Expand Up @@ -326,7 +329,8 @@ require("onedarkpro").setup({
})
```

> **Note**: In the example above, an underline style has been applied to the existing `Comment` highlight group.
> [!NOTE]
> In the example above, an underline style has been applied to the existing `Comment` highlight group.
#### Creating highlight groups

Expand All @@ -350,7 +354,8 @@ require("onedarkpro").setup({
})
```

> **Note**: This can be useful to prevent LSP servers from applying semantic highlights
> [!NOTE]
> This can be useful to prevent LSP servers from applying semantic highlights
#### Specifying highlight attributes by theme or background

Expand Down Expand Up @@ -392,7 +397,8 @@ require("onedarkpro").setup({

### Configuring styles

> **Note**: For a list of available styles, please refer to the [Neovim documentation](https://neovim.io/doc/user/api.html#nvim_set_hl())
> [!NOTE]
> For a list of available styles, please refer to the [Neovim documentation](https://neovim.io/doc/user/api.html#nvim_set_hl())
Styles can be applied to highlight groups:

Expand Down Expand Up @@ -430,7 +436,8 @@ require("onedarkpro").setup({

### Configuring filetype highlighting

> **Note**: Please see the [Contributing](https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md) guide if you would like add support for new filetypes.
> [!NOTE]
> Please see the [Contributing](https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md) guide if you would like add support for new filetypes.
The theme supports opinionated highlighting for filetypes, just like the original Visual Studio Code theme. By default, all of the filetypes supported are loaded at runtime. The theme currently has support for:

Expand Down Expand Up @@ -506,7 +513,8 @@ To determine which highlight group is being applied in Neovim, see the [FAQ](#qu

#### Configuring LSP semantic tokens

> **Note**: Semantic tokens are only available in Neovim 0.9+ and with selected LSP servers.
> [!NOTE]
> Semantic tokens are only available in Neovim 0.9+ and with selected LSP servers.
In Neovim, some LSP servers may send tokens to the editor to allow for more intelligent highlighting such as variable scope; a feature which is impossible with tree-sitter alone.

Expand All @@ -518,7 +526,8 @@ Finally, the colorscheme has defined some non-filetype tokens as a plugin, named

### Configuring plugins

> **Note**: Please see the [Contributing](https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md) guide if you would like add support for new plugins.
> [!NOTE]
> Please see the [Contributing](https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md) guide if you would like add support for new plugins.
By default, all of the plugins supported by the theme are loaded at runtime. Specific plugins can be disabled as follows:

Expand Down Expand Up @@ -628,7 +637,8 @@ Without specifying a theme name, the helper will get the colors for the currentl

You can also use the command `:OnedarkproColors` to open a scratch buffer with the colors from the currently loaded theme. This then allows a colorizer plugin to highlight the colors.

> **Note**: Please ensure that the colorscheme loads ahead of any plugins which may wish to use the theme's colors.
> [!NOTE]
> Please ensure that the colorscheme loads ahead of any plugins which may wish to use the theme's colors.
**Using colors _before_ a theme loads**

Expand All @@ -641,7 +651,8 @@ local colors = color.get_preloaded_colors()
print(colors.purple) -- #c678dd (if using the Onedark theme)
```

> **Note**: This will only output the theme's core color palette and not any generated colors.
> [!NOTE]
> This will only output the theme's core color palette and not any generated colors.
**Darken/Lighten/Brighten colors**

Expand Down
20 changes: 10 additions & 10 deletions doc/onedarkpro.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ CONFIGURATION *onedarkpro.nvim-configuration*
DEFAULT CONFIGURATION ~


**Note**You only need to the call the `setup` function if you wish to change
[!NOTE] You only need to the call the `setup` function if you wish to change
any of the defaults.
Click to see the default configuration ~

Expand Down Expand Up @@ -245,7 +245,7 @@ palette:
<


**Note**See the |onedarkpro.nvim-helpers| section to understand how to use the
[!NOTE] See the |onedarkpro.nvim-helpers| section to understand how to use the
color helpers.
These can then be used for custom highlight groups if desired:

Expand Down Expand Up @@ -347,7 +347,7 @@ customize or _override_ them:
<


**Note**In the example above, an underline style has been applied to the
[!NOTE] In the example above, an underline style has been applied to the
existing `Comment` highlight group.

CREATING HIGHLIGHT GROUPS
Expand All @@ -373,7 +373,7 @@ or, if you’d like to disable certain highlight groups:
<


**Note**This can be useful to prevent LSP servers from applying semantic
[!NOTE] This can be useful to prevent LSP servers from applying semantic
highlights

SPECIFYING HIGHLIGHT ATTRIBUTES BY THEME OR BACKGROUND
Expand Down Expand Up @@ -422,7 +422,7 @@ Neovim supports the application of highlights to specific buffers via
CONFIGURING STYLES ~


**Note**For a list of available styles, please refer to the |Neovim
[!NOTE] For a list of available styles, please refer to the |Neovim
documentation|
Styles can be applied to highlight groups:

Expand Down Expand Up @@ -465,7 +465,7 @@ styles may be configured as shown in the example below:
CONFIGURING FILETYPE HIGHLIGHTING ~


**Note**Please see the Contributing
[!NOTE] Please see the Contributing
<https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md> guide
if you would like add support for new filetypes.
The theme supports opinionated highlighting for filetypes, just like the
Expand Down Expand Up @@ -551,7 +551,7 @@ To determine which highlight group is being applied in Neovim, see the
CONFIGURING LSP SEMANTIC TOKENS


**Note**Semantic tokens are only available in Neovim 0.9+ and with selected LSP
[!NOTE] Semantic tokens are only available in Neovim 0.9+ and with selected LSP
servers.
In Neovim, some LSP servers may send tokens to the editor to allow for more
intelligent highlighting such as variable scope; a feature which is impossible
Expand All @@ -575,7 +575,7 @@ named `lsp_semantic_tokens`. See the section below for how to disable this.
CONFIGURING PLUGINS ~


**Note**Please see the Contributing
[!NOTE] Please see the Contributing
<https://github.com/olimorris/onedarkpro.nvim/blob/main/CONTRIBUTING.md> guide
if you would like add support for new plugins.
By default, all of the plugins supported by the theme are loaded at runtime.
Expand Down Expand Up @@ -704,7 +704,7 @@ the colors from the currently loaded theme. This then allows a colorizer plugin
to highlight the colors.


**Note**Please ensure that the colorscheme loads ahead of any plugins which may
[!NOTE] Please ensure that the colorscheme loads ahead of any plugins which may
wish to use the theme’s colors.
**Using colors before a theme loads**

Expand All @@ -722,7 +722,7 @@ method can be used:
<


**Note**This will only output the theme’s core color palette and not any
[!NOTE] This will only output the theme’s core color palette and not any
generated colors.
**Darken/Lighten/Brighten colors**

Expand Down

0 comments on commit 3fbb6e8

Please sign in to comment.