Skip to content

Commit

Permalink
docs: move usage with vim.ui.select under 'Usage' section
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Dec 14, 2023
1 parent 86a7736 commit e218e88
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Usage with `vim.ui.select`](#usage-with-vimuiselect)
- [Configuration](#configuration)
- [Options](#options)
- [General](#general)
Expand All @@ -38,7 +39,6 @@
- [Utility Functions](#utility-functions)
- [Bar Utility Functions](#bar-utility-functions)
- [Menu Utility Functions](#menu-utility-functions)
- [Usage with `vim.ui.select`](#usage-with-vimuiselect)
- [Highlighting](#highlighting)
- [Developers](#developers)
- [Architecture](#architecture)
Expand Down Expand Up @@ -226,6 +226,16 @@ https://github.com/Bekaboo/dropbar.nvim/assets/76579810/e8c1ac26-0321-4762-9975-
- To disable, remap or add new keymaps in the drop-down menu, see
[menu options](#menu)

### Usage with `vim.ui.select`

Dropbar can be used as a drop-in replacement for Neovim's builtin `vim.ui.select` menu.

To enable this functionality, simply replace `vim.ui.select` with `dropbar.utils.menu.select`:

```lua
vim.ui.select = require('dropbar.utils.menu').select
```

## Configuration

### Options
Expand Down Expand Up @@ -1608,16 +1618,6 @@ Defined in [`lua/dropbar/utils/menu.lua`](https://github.com/Bekaboo/dropbar.nvi
- Opt-in replacement for `vim.ui.select`
- Supports non-string items by formatting via the `opts.format_item` callback

### Usage with `vim.ui.select`

Dropbar can be used as a drop-in replacement for Neovim's builtin `vim.ui.select` menu.

To enable this functionality, simply replace `vim.ui.select` with `dropbar.utils.menu.select`:

```lua
vim.ui.select = require('dropbar.utils.menu').select
```

### Highlighting

`dropbar.nvim` defines the following highlight groups that, override them in
Expand Down
26 changes: 13 additions & 13 deletions doc/dropbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONTENTS *dropbar-table-of-contents*
2. Requirements |dropbar-requirements|
3. Installation |dropbar-installation|
4. Usage |dropbar-usage|
4.1 Usage with `vim.ui.select` |dropbar-usage-with-ui-select|
5. Configuration |dropbar-configuration|
5.1 Options |dropbar-configuration-options|
5.1.1 General |dropbar-configuration-options-general|
Expand All @@ -30,7 +31,6 @@ CONTENTS *dropbar-table-of-contents*
5.3 Utility Functions |dropbar-configuration-utility-functions|
5.3.1 Bar Utility Functions |dropbar-configuration-utility-functions-bar|
5.3.2 Menu Utility Functions |dropbar-configuration-utility-functions-menu|
5.4 Usage with `vim.ui.select` |dropbar-configuration-usage-with-ui-select|
5.5 Highlighting |dropbar-configuration-highlighting|
6. Developers |dropbar-developers|
6.1 Architecture |dropbar-developers-architecture|
Expand Down Expand Up @@ -172,6 +172,18 @@ USAGE *dropbar-usage*
- To disable, remap or add new keymaps in the drop-down menu, see
|dropbar-configuration-options|

------------------------------------------------------------------------------
USAGE WITH `vim.ui.select` *dropbar-usage-with-ui-select*

Dropbar can be used as a drop-in replacement for Neovim's builtin
`vim.ui.select` menu.

To enable this functionality, simply replace `vim.ui.select` with
`dropbar.utils.menu.select`: >lua

vim.ui.select = require('dropbar.utils.menu').select
<


==============================================================================
CONFIGURATION *dropbar-configuration*
Expand Down Expand Up @@ -1025,18 +1037,6 @@ utils.menu.get_current() *dropbar-utility-functions-utils.menu.get_current()*
Returns ~
`dropbar_menu_t` or `nil`

------------------------------------------------------------------------------
USAGE WITH `vim.ui.select` *dropbar-configuration-usage-with-ui-select*

Dropbar can be used as a drop-in replacement for Neovim's builtin
`vim.ui.select` menu.

To enable this functionality, simply replace `vim.ui.select` with
`dropbar.utils.menu.select`: >lua

vim.ui.select = require('dropbar.utils.menu').select
<

------------------------------------------------------------------------------
HIGHLIGHTING *dropbar-configuration-highlighting*

Expand Down

0 comments on commit e218e88

Please sign in to comment.