Skip to content

Commit

Permalink
chore(build): auto-generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 9, 2024
1 parent ac215f7 commit 14c808d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ config.defaults = {
max_height = 10,
border = "rounded",
position = "auto",
format_entry = function(entry)
local deprecated = entry.completion_item.deprecated
or vim.tbl_contains(entry.completion_item.tags or {}, 1)
format_entry = function(entry, data)
local completion_item = entry.completion_item
local type_icons = config.options.ui.type_icons or {}
-- TODO: remove since now can only be number, or also allow custom string kinds?
local entry_kind = type(completion_item.kind) == "string" and completion_item.kind
or require("care.utils.lsp").get_kind_name(completion_item.kind)
return {
{ { completion_item.label .. " ", deprecated and "Comment" or "@care.entry" } },
{ { completion_item.label .. " ", data.deprecated and "Comment" or "@care.entry" } },
{
{
" " .. (type_icons[entry_kind] or type_icons.Text) .. " ",
Expand Down Expand Up @@ -397,6 +395,11 @@ Additional data passed to format function to allow more advanced formatting
# Fields

## Index
`format_data.index? integer`
`format_data.index integer`

Index of the entry in the completion menu
Index of the entry in the completion menu

## Deprecated
`format_data.deprecated boolean`

Whether the item is marked as deprecated by the source or not

0 comments on commit 14c808d

Please sign in to comment.