Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
chore: generated vimdoc (#137)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored and famiu committed Oct 3, 2021
1 parent 087bc82 commit c1efdc1
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions doc/feline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,91 @@ with no provider or an empty provider may be useful for things like
|feline-applying-a-highlight-to-section-gaps| or just having an icon or
separator as a component.

*feline-Truncation*

Truncation Feline has an automatic smart truncation
system where components can be
automatically truncated if the
statusline doesn’t fit within the
window. There’s a few component values
associated with truncation.


COMPONENT SHORT PROVIDER

`short_provider` is an optional component value that allows you to take
advantage of Feline’s truncation system. Note that this should only be
defined if you want to enable truncation for the component, otherwise it’s
absolutely fine to omit it.

`short_provider` works just like the `provider` value, but is activated only
when the component is being truncated due to the statusline not fitting within
the window. `short_provider` is independent from the `provider` value so it can
be a different provider altogether, or it can be a shortened version of the
same provider or the same provider but with a different `opts` value. For
example:

>
-- In this component, short provider uses same provider but with different opts
local file_info_component = {
provider = {
name = 'file_info',
opts = {
type = 'full-path'
}
},
short_provider = {
name = 'file_info',
opts = {
type = 'short-path'
}
}
}
-- Short provider can also be an independent value / function
local my_component = {
provider = 'loooooooooooooooong',
short_provider = 'short'
}
<


Feline doesn’t set `short_provider` to any component by default, so it must
be provided manually.

HIDE COMPONENTS DURING TRUNCATION

If you wish to allow Feline to hide a component entirely if necessary during
truncation, you may set the `truncate_hide` component value to `true`. By
default, `truncate_hide` is `false` for every component.

COMPONENT PRIORITY

When components are being truncated by Feline, you can choose to give some
components a higher priority over the other components. The `priority`
component value just takes a number. By default, the priority of a component is
`0`. Components are truncated in ascending order of priority. So components
with lower priority are truncated first, while components with higher priority
are truncated later on. For example:

>
-- This component has the default priority
local my_component = {
provider = 'loooooooooooooooong',
short_provider = 'short'
}
-- This component has a higher priority, so it will be truncated after the previous component
local high_priority_component = {
provider = 'long provider with high priority',
short_provider = 'short',
priority = 1
}
<


Priority can also be set to a negative number, which can be used to make a
component be truncated earlier than the ones with default priority.

*feline-Conditionally-enable-components*

Conditionally enable components The `enabled` value of a component can
Expand Down

0 comments on commit c1efdc1

Please sign in to comment.