Skip to content

Commit

Permalink
docs: Reword details regarding symbols.icon_fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed Jul 5, 2024
1 parent 287ec77 commit 8bfb543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,14 @@ Pass a table to the setup call with your configuration options.
-- 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 as string.
---@param kind string
---@param kind string Key of the icons table below
---@param bufnr integer Code buffer
---@returns string|boolean The icon string (key of `icons` table), or `false`
---@returns string|boolean The icon string to display, such as "f", or `false`
--- to fallback to `icon_source`.
icon_fetcher = nil,
-- 3rd party source for fetching icons. Fallback if icon_fetcher returned
-- empty string. Currently supported values: 'lspkind'
-- 3rd party source for fetching icons. This is used as a fallback if
-- icon_fetcher returned an empty string.
-- Currently supported values: 'lspkind'
icon_source = nil,
-- The next fallback if both icon_fetcher and icon_source has failed, is
-- the custom mapping of icons specified below. The icons table is also
Expand Down
1 change: 1 addition & 0 deletions lua/outline/symbols.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ end

---@param kind string|integer
---@param bufnr integer
---@return string icon
function M.icon_from_kind(kind, bufnr)
local kindstr = kind
if type(kind) ~= 'string' then
Expand Down

0 comments on commit 8bfb543

Please sign in to comment.