|
10 | 10 | --- @field snippet_forward string | string[]
|
11 | 11 | --- @field snippet_backward string | string[]
|
12 | 12 |
|
| 13 | +--- @class blink.cmp.AcceptConfig |
| 14 | +--- @field auto_brackets blink.cmp.AutoBracketsConfig |
| 15 | + |
| 16 | +--- @class blink.cmp.AutoBracketsConfig |
| 17 | +--- @field enabled boolean |
| 18 | +--- @field default_brackets string[] |
| 19 | +--- @field override_brackets_for_filetypes table<string, string[] | function(item: blink.cmp.CompletionItem): string[]> |
| 20 | +--- @field force_allow_filetypes string[] Overrides the default blocked filetypes |
| 21 | +--- @field blocked_filetypes string[] |
| 22 | +--- @field kind_resolution blink.cmp.AutoBracketResolutionConfig Synchronously use the kind of the item to determine if brackets should be added |
| 23 | +--- @field semantic_token_resolution blink.cmp.AutoBracketResolutionConfig Asynchronously use semantic token to determine if brackets should be added |
| 24 | + |
| 25 | +--- @class blink.cmp.AutoBracketResolutionConfig |
| 26 | +--- @field enabled boolean |
| 27 | +--- @field blocked_filetypes string[] |
| 28 | + |
13 | 29 | --- @class blink.cmp.TriggerConfig
|
14 | 30 | --- @field context_regex string
|
15 | 31 | --- @field blocked_trigger_characters string[]
|
|
66 | 82 | --- @field update_delay_ms number Delay before updating the documentation window
|
67 | 83 |
|
68 | 84 | --- @class blink.cmp.Config
|
| 85 | +--- @field keymap blink.cmp.KeymapConfig |
| 86 | +--- @field accept blink.cmp.AcceptConfig |
69 | 87 | --- @field trigger blink.cmp.TriggerConfig
|
70 | 88 | --- @field fuzzy blink.cmp.FuzzyConfig
|
71 | 89 | --- @field sources blink.cmp.SourceConfig
|
@@ -94,6 +112,24 @@ local config = {
|
94 | 112 | snippet_backward = '<S-Tab>',
|
95 | 113 | },
|
96 | 114 |
|
| 115 | + accept = { |
| 116 | + auto_brackets = { |
| 117 | + enabled = false, |
| 118 | + default_brackets = { '(', ')' }, |
| 119 | + override_brackets_for_filetypes = {}, |
| 120 | + force_allow_filetypes = {}, |
| 121 | + blocked_filetypes = {}, |
| 122 | + kind_resolution = { |
| 123 | + enabled = true, |
| 124 | + blocked_filetypes = { 'typescript', 'typescriptreact', 'javascript', 'javascriptreact', 'vue' }, |
| 125 | + }, |
| 126 | + semantic_token_resolution = { |
| 127 | + enabled = true, |
| 128 | + blocked_filetypes = {}, |
| 129 | + }, |
| 130 | + }, |
| 131 | + }, |
| 132 | + |
97 | 133 | trigger = {
|
98 | 134 | -- regex used to get the text when fuzzy matching
|
99 | 135 | -- changing this may break some sources, so please report if you run into issues
|
@@ -155,7 +191,7 @@ local config = {
|
155 | 191 | autocomplete_south = { 'e', 'w', 's', 'n' },
|
156 | 192 | },
|
157 | 193 | auto_show = true,
|
158 |
| - auto_show_delay_ms = 0, |
| 194 | + auto_show_delay_ms = 500, |
159 | 195 | update_delay_ms = 100,
|
160 | 196 | },
|
161 | 197 | },
|
|
0 commit comments