Auto generate vim docs

This commit is contained in:
hedyhli
2023-11-11 08:04:55 +00:00
committed by github-actions[bot]
parent b9594d80a0
commit f6d3ce2ee0

View File

@@ -273,6 +273,17 @@ Default values are shown:
-- Symbols to ignore. -- Symbols to ignore.
-- Possible values are the Keys in the icons table below. -- Possible values are the Keys in the icons table below.
blacklist = {}, blacklist = {},
-- Added in this fork:
-- You can use a custom function that returns the icon for each symbol kind.
-- This function takes a kind (string) as parameter and should return an
-- icon.
icon_fetcher = nil,
-- 3rd party source for fetching icons. Fallback if icon_fetcher returned
-- empty string. Currently supported values: 'lspkind'
icon_source = nil,
-- The next fall back if both icon_fetcher and icon_source has failed, is
-- the custom mapping of icons specified below. The icons table is also
-- needed for specifying hl group.
-- Changed in this fork to fix deprecated icons not showing. -- Changed in this fork to fix deprecated icons not showing.
icons = { icons = {
File = { icon = "󰈔", hl = "@text.uri" }, File = { icon = "󰈔", hl = "@text.uri" },
@@ -317,6 +328,15 @@ To find out exactly what some of the options do, please see the
|symbols-outline-recipes| section of the readme at the bottom for |symbols-outline-recipes| section of the readme at the bottom for
screen-recordings. screen-recordings.
The order in which the sources for icons are checked is:
1. Icon fetcher function
2. Icon source (only `lspkind` is supported for this option as of now)
3. Icons table
A fallback is always used if the previous candidate returned either an empty
string or a falsey value.
COMMANDS *symbols-outline-commands* COMMANDS *symbols-outline-commands*
@@ -404,6 +424,9 @@ Possible highlight groups provided by symbols-outline to customize:
You can customize any other highlight groups using `winhl` too, this option is You can customize any other highlight groups using `winhl` too, this option is
passed directly to the `winhl` vim option unprocessed. passed directly to the `winhl` vim option unprocessed.
To customize colors of the symbol icons, use the `symbols.icons` table. See
|symbols-outline-config|.
PREVIEW WINDOW ~ PREVIEW WINDOW ~
@@ -461,6 +484,17 @@ TIPS *symbols-outline-tips*
- To customize the background colors, text colors, and borders, you can use - To customize the background colors, text colors, and borders, you can use
`outline_window.winhl` for the outline window or `preview_window.winhl` for the `outline_window.winhl` for the outline window or `preview_window.winhl` for the
preview floating window. See |symbols-outline-highlights|. preview floating window. See |symbols-outline-highlights|.
- To fix symbol icon related issues, there are several options. If you use
`lspkind`, you can set `symbols.icon_source = 'lspkind'` to use lspkind for
fetching icons. You can also use your own function `symbols.icon_fetcher` that
takes a string and should return an icon. Otherwise, you can edit the
`symbols.icons` table for specifying icons.
The order in which the sources of icons are checked is:
1. Icon fetcher function
2. Icon source
3. Icons table
A fallback is always used if the previous candidate returned either an empty
string or a falsey value.
RECIPES *symbols-outline-recipes* RECIPES *symbols-outline-recipes*
@@ -560,6 +594,22 @@ the outline becomes more readable this way, hence this is an option.
This feature is newly added in this fork, and is currently experimental (may be This feature is newly added in this fork, and is currently experimental (may be
unstable). unstable).
- **Custom icons**
You can write your own function for fetching icons. Here is one such example
that simply returns in plain text, the first letter of the given kind.
>lua
symbols = {
icon_fetcher = function(kind) return kind:sub(1,1) end
}
<
The fetcher function, if provided, is checked first before using `icon_source`
and `icons` as fallback.
============================================================================== ==============================================================================
1. Links *symbols-outline-links* 1. Links *symbols-outline-links*