Skip to content

Commit

Permalink
docs: scroll_lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Iron-E committed Mar 30, 2023
1 parent 7138fa8 commit 64a3e50
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 11 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ require'barbar'.setup {
-- Sets the maximum buffer name length.
maximum_length = 30,
-- Ensure pinned buffers stay visible in the tabline
scroll_lock = {pinned = true},
-- If set, the letters for each buffer in buffer-pick mode will be
-- assigned based on their name. Otherwise or in case all letters are
-- already assigned, the behavior is to assign letters in order of
Expand Down
57 changes: 46 additions & 11 deletions doc/barbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Highlight groups are created in this way: `Buffer<STATUS><PART>`.
`<STATUS>` Meaning
--------- --------------------------------------------------
`Alternate` The |alternate-file|.
`Current` The current buffer.
`Current` The |current-file|.
`Inactive` |hidden-buffer|s and |inactive-buffer|s.
`Visible` |active-buffer|s which are not alternate or current.

Expand Down Expand Up @@ -162,22 +162,22 @@ exclude_name ~
focus_on_close ~
`'left'|'right'` (default: `'left'`)
A buffer to this direction will be focused (if it exists) when closing the
current buffer.
|current-file|.

*barbar-setup.hide*
hide ~
Sets which elements are hidden in the bufferline. Possible options are:
Sets which elements are hidden in the 'tabline'. Possible options are:

*barbar-setup.hide.alternate*
hide.alternate ~
`boolean` (default: `false`)
Controls the visibility of the |alternate-file|.
|barbar-setup.highlight_alternate| must be `true`.
NOTE: |barbar-setup.highlight_alternate| must be `true`.

*barbar-setup.hide.current*
hide.current ~
`boolean` (default: `false`)
Controls the visibility of the current buffer.
Controls the visibility of the |current-file|.

*barbar-setup.hide.extensions*
hide.extensions ~
Expand All @@ -193,7 +193,7 @@ hide ~
hide.visible ~
`boolean` (default: `false`)
Controls visibility of |active-buffer|s.
|barbar-setup.highlight_visible| must be `true`.
NOTE: |barbar-setup.highlight_visible| must be `true`.

*barbar-setup.highlight_alternate*
highlight_alternate ~
Expand Down Expand Up @@ -242,10 +242,10 @@ icons ~
[vim.diagnostic.severity.INFO] = {enabled = false, icon = 'ⓘ '},
[vim.diagnostic.severity.WARN] = {enabled = false, icon = '⚠️ '},
}
< Enables or disables showing diagnostics in the bufferline. The options
< Enables or disables showing diagnostics in the 'tabline'. The options
are:
- `enabled`, whether this diagnostics of this severity are shown in the
bufferline.
'tabline'.
- `icon`, which controls what icon accompanies the number of diagnostics.

*barbar-setup.icons.filetype.custom_colors*
Expand Down Expand Up @@ -311,7 +311,7 @@ icons ~
*barbar-setup.icons.current*
icons.current ~
`table`
The icons which should be used for current buffer.
The icons which should be used for |current-file|.
Supports all the base options (e.g. `buffer_index`, `filetype.enabled`,
etc) as well as `modified` and `pinned`.

Expand Down Expand Up @@ -346,14 +346,14 @@ icons ~
insert_at_start ~
`boolean` (default: `false`)
If true, new buffers appear at the start of the list. Default is to
open after the current buffer.
open after the |current-file|.
Has priority over |barbar-setup.insert_at_end|

*barbar-setup.insert_at_end*
insert_at_end ~
`boolean` (default: `false`)
If true, new buffers appear at the end of the list. Default is to
open after the current buffer.
open after the |current-file|.

*barbar-setup.letters*
letters ~
Expand Down Expand Up @@ -383,6 +383,41 @@ no_name_title ~
Sets the name of unnamed buffers. By default format is `'[Buffer X]'`
where `X` is the buffer number. But only a static string is accepted here.

*barbar-setup.scroll_lock*
scroll_lock ~
`table`
Controls which elements will always be shown in the 'tabline'.

*barbar-setup.scroll_lock.alternate*
scroll_lock.alternate ~
`boolean` (default: `false`)
If `true`, the |alternate-file| will always be shown in the 'tabline'.
NOTE: |barbar-setup.highlight_alternate| must be `true` and
|barbar-setup.hide.alternate| must be `false`.

*barbar-setup.scroll_lock.current*
scroll_lock.current ~
`boolean` (default: `false`)
If `true`, the |current-file| will always be shown in the 'tabline'.
NOTE: |barbar-setup.hide.current| must be `false`.

*barbar-setup.scroll_lock.modified*
scroll_lock.modified ~
`boolean` (default: `false`)
If `true`, 'modified' buffers will always be shown in the 'tabline'.

*barbar-setup.scroll_lock.pinned*
scroll_lock.pinned ~
`boolean` (default: `false`)
If `true`, pinned buffers will always be shown in the 'tabline'.

*barbar-setup.scroll_lock.visible*
scroll_lock.visible ~
`boolean` (default: `false`)
If `true`, |active-buffer|s will always be shown in the 'tabline'.
NOTE: |barbar-setup.highlight_visible| must be `true` and
|barbar-setup.hide.visible| must be `false`.

*barbar-setup.semantic_letters*
semantic_letters ~
`boolean` (default: `true`)
Expand Down

0 comments on commit 64a3e50

Please sign in to comment.