|
1 | 1 | --- @class blink.cmp.KeymapConfig
|
2 |
| ---- @field show string | string[] |
3 |
| ---- @field accept string | string[] |
4 |
| ---- @field select_prev string | string[] |
5 |
| ---- @field select_next string | string[] |
6 |
| ---- @field show_documentation string | string[] |
7 |
| ---- @field hide_documentation string | string[] |
8 |
| ---- @field scroll_documentation_up string | string[] |
9 |
| ---- @field scroll_documentation_down string | string[] |
10 |
| ---- @field snippet_forward string | string[] |
11 |
| ---- @field snippet_backward string | string[] |
| 2 | +--- @field show? string | string[] |
| 3 | +--- @field accept? string | string[] |
| 4 | +--- @field select_prev? string | string[] |
| 5 | +--- @field select_next? string | string[] |
| 6 | +--- @field show_documentation? string | string[] |
| 7 | +--- @field hide_documentation? string | string[] |
| 8 | +--- @field scroll_documentation_up? string | string[] |
| 9 | +--- @field scroll_documentation_down? string | string[] |
| 10 | +--- @field snippet_forward? string | string[] |
| 11 | +--- @field snippet_backward? string | string[] |
12 | 12 |
|
13 | 13 | --- @class blink.cmp.AcceptConfig
|
14 |
| ---- @field create_undo_point boolean Create an undo point when accepting a completion item |
15 |
| ---- @field auto_brackets blink.cmp.AutoBracketsConfig |
| 14 | +--- @field create_undo_point? boolean Create an undo point when accepting a completion item |
| 15 | +--- @field auto_brackets? blink.cmp.AutoBracketsConfig |
16 | 16 |
|
17 | 17 | --- @class blink.cmp.AutoBracketsConfig
|
18 |
| ---- @field enabled boolean |
19 |
| ---- @field default_brackets string[] |
20 |
| ---- @field override_brackets_for_filetypes table<string, string[] | function(item: blink.cmp.CompletionItem): string[]> |
21 |
| ---- @field force_allow_filetypes string[] Overrides the default blocked filetypes |
22 |
| ---- @field blocked_filetypes string[] |
23 |
| ---- @field kind_resolution blink.cmp.AutoBracketResolutionConfig Synchronously use the kind of the item to determine if brackets should be added |
24 |
| ---- @field semantic_token_resolution blink.cmp.AutoBracketSemanticTokenResolutionConfig Asynchronously use semantic token to determine if brackets should be added |
| 18 | +--- @field enabled? boolean |
| 19 | +--- @field default_brackets? string[] |
| 20 | +--- @field override_brackets_for_filetypes? table<string, string[] | function(item: blink.cmp.CompletionItem): string[]> |
| 21 | +--- @field force_allow_filetypes? string[] Overrides the default blocked filetypes |
| 22 | +--- @field blocked_filetypes? string[] |
| 23 | +--- @field kind_resolution? blink.cmp.AutoBracketResolutionConfig Synchronously use the kind of the item to determine if brackets should be added |
| 24 | +--- @field semantic_token_resolution? blink.cmp.AutoBracketSemanticTokenResolutionConfig Asynchronously use semantic token to determine if brackets should be added |
25 | 25 |
|
26 | 26 | --- @class blink.cmp.AutoBracketResolutionConfig
|
27 |
| ---- @field enabled boolean |
28 |
| ---- @field blocked_filetypes string[] |
| 27 | +--- @field enabled? boolean |
| 28 | +--- @field blocked_filetypes? string[] |
29 | 29 | ---
|
30 | 30 | --- @class blink.cmp.AutoBracketSemanticTokenResolutionConfig : blink.cmp.AutoBracketResolutionConfig
|
31 |
| ---- @field timeout_ms number How long to wait for semantic tokens to return before assuming no brackets should be added |
| 31 | +--- @field timeout_ms? number How long to wait for semantic tokens to return before assuming no brackets should be added |
32 | 32 |
|
33 | 33 | --- @class blink.cmp.CompletionTriggerConfig
|
34 |
| ---- @field keyword_regex string |
35 |
| ---- @field blocked_trigger_characters string[] |
36 |
| ---- @field show_on_insert_on_trigger_character boolean When true, will show the completion window when the cursor comes after a trigger character when entering insert mode |
37 |
| ---- @field show_on_insert_blocked_trigger_characters string[] List of additional trigger characters that won't trigger the completion window when the cursor comes after a trigger character when entering insert mode |
| 34 | +--- @field keyword_regex? string |
| 35 | +--- @field blocked_trigger_characters? string[] |
| 36 | +--- @field show_on_insert_on_trigger_character? boolean When true, will show the completion window when the cursor comes after a trigger character when entering insert mode |
| 37 | +--- @field show_on_insert_blocked_trigger_characters? string[] List of additional trigger characters that won't trigger the completion window when the cursor comes after a trigger character when entering insert mode |
38 | 38 | ---
|
39 | 39 | --- @class blink.cmp.SignatureHelpTriggerConfig
|
40 |
| ---- @field enabled boolean |
41 |
| ---- @field blocked_trigger_characters string[] |
42 |
| ---- @field blocked_retrigger_characters string[] |
43 |
| ---- @field show_on_insert_on_trigger_character boolean When true, will show the signature help window when the cursor comes after a trigger character when entering insert mode |
| 40 | +--- @field enabled? boolean |
| 41 | +--- @field blocked_trigger_characters? string[] |
| 42 | +--- @field blocked_retrigger_characters? string[] |
| 43 | +--- @field show_on_insert_on_trigger_character? boolean When true, will show the signature help window when the cursor comes after a trigger character when entering insert mode |
44 | 44 | ---
|
45 | 45 | --- @class blink.cmp.TriggerConfig
|
46 |
| ---- @field completion blink.cmp.CompletionTriggerConfig |
47 |
| ---- @field signature_help blink.cmp.SignatureHelpTriggerConfig |
| 46 | +--- @field completion? blink.cmp.CompletionTriggerConfig |
| 47 | +--- @field signature_help? blink.cmp.SignatureHelpTriggerConfig |
48 | 48 |
|
49 | 49 | --- @class blink.cmp.SourceConfig
|
50 |
| ---- @field providers blink.cmp.SourceProviderConfig[][] |
| 50 | +--- @field providers? blink.cmp.SourceProviderConfig[][] |
51 | 51 | ---
|
52 | 52 | --- @class blink.cmp.SourceProviderConfig
|
53 |
| ---- @field [1] string |
54 |
| ---- @field keyword_length number | nil |
55 |
| ---- @field score_offset number | nil |
56 |
| ---- @field deduplicate blink.cmp.DeduplicateConfig | nil |
57 |
| ---- @field trigger_characters string[] | nil |
58 |
| ---- @field opts table | nil |
| 53 | +--- @field [1]? string |
| 54 | +--- @field keyword_length? number | nil |
| 55 | +--- @field score_offset? number | nil |
| 56 | +--- @field deduplicate? blink.cmp.DeduplicateConfig | nil |
| 57 | +--- @field trigger_characters? string[] | nil |
| 58 | +--- @field opts? table | nil |
59 | 59 | ---
|
60 | 60 | --- @class blink.cmp.DeduplicateConfig
|
61 |
| ---- @field enabled boolean |
62 |
| ---- @field priority number |
| 61 | +--- @field enabled? boolean |
| 62 | +--- @field priority? number |
63 | 63 |
|
64 | 64 | --- @class blink.cmp.PrebuiltBinariesConfig
|
65 |
| ---- @field download boolean |
66 |
| ---- @field forceVersion string | nil |
| 65 | +--- @field download? boolean |
| 66 | +--- @field forceVersion? string | nil |
67 | 67 |
|
68 | 68 | --- @class blink.cmp.FuzzyConfig
|
69 |
| ---- @field use_frecency boolean |
70 |
| ---- @field use_proximity boolean |
71 |
| ---- @field max_items number |
72 |
| ---- @field sorts ("label" | "kind" | "score")[] |
73 |
| ---- @field prebuiltBinaries blink.cmp.PrebuiltBinariesConfig |
| 69 | +--- @field use_frecency? boolean |
| 70 | +--- @field use_proximity? boolean |
| 71 | +--- @field max_items? number |
| 72 | +--- @field sorts? ("label" | "kind" | "score")[] |
| 73 | +--- @field prebuiltBinaries? blink.cmp.PrebuiltBinariesConfig |
74 | 74 |
|
75 | 75 | --- @class blink.cmp.WindowConfig
|
76 |
| ---- @field autocomplete blink.cmp.AutocompleteConfig |
77 |
| ---- @field documentation blink.cmp.DocumentationConfig |
78 |
| ---- @field signature_help blink.cmp.SignatureHelpConfig |
| 76 | +--- @field autocomplete? blink.cmp.AutocompleteConfig |
| 77 | +--- @field documentation? blink.cmp.DocumentationConfig |
| 78 | +--- @field signature_help? blink.cmp.SignatureHelpConfig |
79 | 79 |
|
80 | 80 | --- @class blink.cmp.HighlightConfig
|
81 |
| ---- @field ns number |
82 |
| ---- @field use_nvim_cmp_as_default boolean |
| 81 | +--- @field ns? number |
| 82 | +--- @field use_nvim_cmp_as_default? boolean |
83 | 83 |
|
84 | 84 | --- @class blink.cmp.AutocompleteConfig
|
85 |
| ---- @field min_width number |
86 |
| ---- @field max_width number |
87 |
| ---- @field max_height number |
88 |
| ---- @field border blink.cmp.WindowBorder |
89 |
| ---- @field order "top_down" | "bottom_up" |
90 |
| ---- @field direction_priority ("n" | "s")[] |
91 |
| ---- @field preselect boolean |
92 |
| ---- @field winhighlight string |
93 |
| ---- @field scrolloff number |
94 |
| ---- @field draw 'simple' | 'reversed' | function(blink.cmp.CompletionRenderContext): blink.cmp.Component[] |
95 |
| ---- @field cycle blink.cmp.AutocompleteConfig.CycleConfig |
| 85 | +--- @field min_width? number |
| 86 | +--- @field max_width? number |
| 87 | +--- @field max_height? number |
| 88 | +--- @field border? blink.cmp.WindowBorder |
| 89 | +--- @field order? "top_down" | "bottom_up" |
| 90 | +--- @field direction_priority? ("n" | "s")[] |
| 91 | +--- @field preselect? boolean |
| 92 | +--- @field winhighlight? string |
| 93 | +--- @field scrolloff? number |
| 94 | +--- @field draw? 'simple' | 'reversed' | function(blink.cmp.CompletionRenderContext): blink.cmp.Component[] |
| 95 | +--- @field cycle? blink.cmp.AutocompleteConfig.CycleConfig |
96 | 96 |
|
97 | 97 | --- @class blink.cmp.AutocompleteConfig.CycleConfig
|
98 |
| ---- @field from_bottom boolean When `true`, calling `select_next` at the *bottom* of the completion list will select the *first* completion item. |
99 |
| ---- @field from_top boolean When `true`, calling `select_prev` at the *top* of the completion list will select the *last* completion item. |
| 98 | +--- @field from_bottom? boolean When `true`, calling `select_next` at the *bottom* of the completion list will select the *first* completion item. |
| 99 | +--- @field from_top? boolean When `true`, calling `select_prev` at the *top* of the completion list will select the *last* completion item. |
100 | 100 |
|
101 | 101 | --- @class blink.cmp.DocumentationDirectionPriorityConfig
|
102 |
| ---- @field autocomplete_north ("n" | "s" | "e" | "w")[] |
103 |
| ---- @field autocomplete_south ("n" | "s" | "e" | "w")[] |
| 102 | +--- @field autocomplete_north? ("n" | "s" | "e" | "w")[] |
| 103 | +--- @field autocomplete_south? ("n" | "s" | "e" | "w")[] |
104 | 104 | ---
|
105 | 105 | --- @alias blink.cmp.WindowBorder 'single' | 'double' | 'rounded' | 'solid' | 'shadow' | 'padded' | 'none' | string[]
|
106 | 106 | ---
|
107 | 107 | --- @class blink.cmp.DocumentationConfig
|
108 |
| ---- @field min_width number |
109 |
| ---- @field max_width number |
110 |
| ---- @field max_height number |
111 |
| ---- @field border blink.cmp.WindowBorder |
112 |
| ---- @field direction_priority blink.cmp.DocumentationDirectionPriorityConfig |
113 |
| ---- @field auto_show boolean |
114 |
| ---- @field auto_show_delay_ms number Delay before showing the documentation window |
115 |
| ---- @field update_delay_ms number Delay before updating the documentation window |
116 |
| ---- @field winhighlight string |
| 108 | +--- @field min_width? number |
| 109 | +--- @field max_width? number |
| 110 | +--- @field max_height? number |
| 111 | +--- @field border? blink.cmp.WindowBorder |
| 112 | +--- @field direction_priority? blink.cmp.DocumentationDirectionPriorityConfig |
| 113 | +--- @field auto_show? boolean |
| 114 | +--- @field auto_show_delay_ms? number Delay before showing the documentation window |
| 115 | +--- @field update_delay_ms? number Delay before updating the documentation window |
| 116 | +--- @field winhighlight? string |
117 | 117 |
|
118 | 118 | --- @class blink.cmp.SignatureHelpConfig
|
119 |
| ---- @field min_width number |
120 |
| ---- @field max_width number |
121 |
| ---- @field max_height number |
122 |
| ---- @field border blink.cmp.WindowBorder |
123 |
| ---- @field winhighlight string |
| 119 | +--- @field min_width? number |
| 120 | +--- @field max_width? number |
| 121 | +--- @field max_height? number |
| 122 | +--- @field border? blink.cmp.WindowBorder |
| 123 | +--- @field winhighlight? string |
124 | 124 |
|
125 | 125 | --- @class blink.cmp.Config
|
126 |
| ---- @field keymap blink.cmp.KeymapConfig |
127 |
| ---- @field accept blink.cmp.AcceptConfig |
128 |
| ---- @field trigger blink.cmp.TriggerConfig |
129 |
| ---- @field fuzzy blink.cmp.FuzzyConfig |
130 |
| ---- @field sources blink.cmp.SourceConfig |
131 |
| ---- @field windows blink.cmp.WindowConfig |
132 |
| ---- @field highlight blink.cmp.HighlightConfig |
133 |
| ---- @field nerd_font_variant 'mono' | 'normal' |
134 |
| ---- @field kind_icons table<string, string> |
| 126 | +--- @field keymap? blink.cmp.KeymapConfig |
| 127 | +--- @field accept? blink.cmp.AcceptConfig |
| 128 | +--- @field trigger? blink.cmp.TriggerConfig |
| 129 | +--- @field fuzzy? blink.cmp.FuzzyConfig |
| 130 | +--- @field sources? blink.cmp.SourceConfig |
| 131 | +--- @field windows? blink.cmp.WindowConfig |
| 132 | +--- @field highlight? blink.cmp.HighlightConfig |
| 133 | +--- @field nerd_font_variant? 'mono' | 'normal' |
| 134 | +--- @field kind_icons? table<string, string> |
135 | 135 |
|
136 | 136 | --- @type blink.cmp.Config
|
137 | 137 | local config = {
|
|
0 commit comments