|
32 | 32 | - [`Minuet lsp`](#minuet-lsp)
|
33 | 33 | - [API](#api)
|
34 | 34 | - [Virtual Text](#virtual-text)
|
| 35 | + - [Lualine](#lualine) |
| 36 | + - [Minuet Event](#minuet-event) |
35 | 37 | - [FAQ](#faq)
|
36 | 38 | - [Customize `cmp` ui](#customize-cmp-ui)
|
37 | 39 | - [Customize `blink` ui](#customize-blink-ui)
|
@@ -1063,6 +1065,52 @@ The Minuet LSP command provides commands for managing the in-process LSP server:
|
1063 | 1065 | }
|
1064 | 1066 | ```
|
1065 | 1067 |
|
| 1068 | +## Lualine |
| 1069 | + |
| 1070 | +Minuet provides a Lualine component that displays the current status of Minuet requests. This component shows: |
| 1071 | + |
| 1072 | +- The name of the active provider |
| 1073 | +- The current request count (e.g., "1/3") |
| 1074 | +- An animated spinner while processing |
| 1075 | + |
| 1076 | +To use the Minuet Lualine component, add it to your Lualine configuration: |
| 1077 | + |
| 1078 | +```lua |
| 1079 | +require('lualine').setup { |
| 1080 | + sections = { |
| 1081 | + lualine_x = { |
| 1082 | + require('minuet.lualine'), |
| 1083 | + 'encoding', |
| 1084 | + 'fileformat', |
| 1085 | + 'filetype', |
| 1086 | + }, |
| 1087 | + }, |
| 1088 | +} |
| 1089 | +``` |
| 1090 | + |
| 1091 | +## Minuet Event |
| 1092 | + |
| 1093 | +Minuet emits three distinct events during its request workflow: |
| 1094 | + |
| 1095 | +- **MinuetRequestStartedPre**: Triggered before a completion request is |
| 1096 | + initiated. This allows for pre-request operations, such as logging or updating |
| 1097 | + the user interface. |
| 1098 | +- **MinuetRequestStarted**: Triggered immediately after the completion request |
| 1099 | + is dispatched, signaling that the request is in progress. |
| 1100 | +- **MinuetRequestFinished**: Triggered upon completion of the request. |
| 1101 | + |
| 1102 | +Each event includes a `data` field containing the following properties: |
| 1103 | + |
| 1104 | +- `provider`: A string indicating the provider type (e.g., |
| 1105 | + 'openai_compatible'). |
| 1106 | +- `name`: A string specifying the provider's name (e.g., 'OpenAI', 'Groq', |
| 1107 | + 'Ollama'). |
| 1108 | +- `n_requests`: The number of requests encompassed in this completion cycle. |
| 1109 | +- `request_idx` (optional): The index of the current request, applicable when |
| 1110 | + providers make multiple requests. |
| 1111 | +- `timestamp`: A Unix timestamp representing the start of the request cycle |
| 1112 | + (corresponding to the `MinuetRequestStartedPre` event). |
| 1113 | + |
1066 | 1114 | # FAQ
|
1067 | 1115 |
|
1068 | 1116 | ## Customize `cmp` ui
|
|
0 commit comments