Skip to content

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hui authored and github-actions[bot] committed Dec 6, 2023
1 parent 883b74f commit 08c4e13
Showing 1 changed file with 55 additions and 2 deletions.
57 changes: 55 additions & 2 deletions doc/fidget.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ The following table shows the default options for this plugin:
suppress_on_insert = false, -- Suppress new messages while in insert mode
ignore_done_already = false, -- Ignore new tasks that are already complete
ignore_empty_message = false, -- Ignore new tasks that don't contain a message
clear_on_detach = -- Clear notification group when LSP server detaches
function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end,
notification_group = -- How to get a progress message's notification group key
function(msg) return msg.lsp_name end,
function(msg) return msg.lsp_client.name end,
ignore = {}, -- List of LSP servers to ignore

-- Options related to how LSP progress messages are displayed as notifications
Expand Down Expand Up @@ -209,7 +214,37 @@ e.g.,
end
<

Type: `fun(msg: ProgressMessage): NotificationKey` (default: `msg.lsp_name`)
Type: `fun(msg: ProgressMessage): NotificationKey` (default:
`msg.lsp_client.name`)


*fidget-progress.clear_on_detach*


progress.clear_on_detach Clear notification group when LSP server detaches



This option should be set to a function that, given a client ID number, returns
the notification group to clear. No group will be cleared if the the function
returns `nil`.

The default setting looks up and returns the LSP client name, which is also
used by `progress.notification_group`.

Set this option to `nil` to disable this feature entirely (no `LspDetach`
callback will be registered).

Default value:

>lua
clear_on_detach = function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end
<

Type: `(fun(client_id: number): NotificationKey)?` (default: `client.name`)


*fidget-progress.ignore*
Expand Down Expand Up @@ -901,6 +936,24 @@ Fields:
- `period`: (`number`) How long one cycle of the animation should take, in seconds


*fidget-ProgressMessage*


ProgressMessage Used to configure the behavior of notification groups.



Fields:

- `token`: (`any`) Unique identifier used to accumulate updates
- `title`: (`string?`) Name of the task in progress
- `message`: (`string?`) Message describing the progress
- `percentage: (`number?`) How much of the progress is complete (out of 100).
- `done`: (`boolean`) Whether this progress completed. Ignore percentage if done is true.
- `cancellable`: (`boolean`) Whether this task can be canceled (though doing so is currently unsupported using Fidget)
- `lsp_client`: (`table`) LSP client table this message came from


FUNCTIONS *fidget-fidget-lua-api-functions*


Expand Down

0 comments on commit 08c4e13

Please sign in to comment.