Skip to content

Commit 56f7cb6

Browse files
committed
fix: invalid configuration and readme after refactor
Closes #394
1 parent 1b3cd31 commit 56f7cb6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ MiniDeps.add({
217217
--
218218
-- ['<Tab>'] = {
219219
-- function(cmp)
220-
-- if cmp.is_in_snippet() then return cmp.accept()
220+
-- if cmp.snippet_active() then return cmp.accept()
221221
-- else return cmp.select_and_accept() end
222222
-- end,
223223
-- 'snippet_forward',
@@ -383,7 +383,7 @@ MiniDeps.add({
383383
ellipsis = false,
384384
text = function(ctx) return ctx.kind_icon .. ctx.icon_gap end,
385385
highlight = function(ctx)
386-
return require('blink.cmp.lib.utils').get_tailwind_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
386+
return require('blink.cmp.completion.windows.render.tailwind').get_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
387387
end,
388388
},
389389

@@ -392,7 +392,7 @@ MiniDeps.add({
392392
width = { fill = true },
393393
text = function(ctx) return ctx.kind end,
394394
highlight = function(ctx)
395-
return require('blink.cmp.lib.utils').get_tailwind_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
395+
return require('blink.cmp.completion.windows.render.tailwind').get_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
396396
end,
397397
},
398398

@@ -757,7 +757,7 @@ completion.menu.draw = {
757757
ellipsis = false,
758758
text = function(ctx) return ctx.kind_icon .. ctx.icon_gap end,
759759
highlight = function(ctx)
760-
return require('blink.cmp.lib.utils').get_tailwind_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
760+
return require('blink.cmp.completion.windows.render.tailwind').get_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
761761
end,
762762
},
763763

@@ -766,7 +766,7 @@ completion.menu.draw = {
766766
width = { fill = true },
767767
text = function(ctx) return ctx.kind end,
768768
highlight = function(ctx)
769-
return require('blink.cmp.lib.utils').get_tailwind_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
769+
return require('blink.cmp.completion.windows.render.tailwind').get_hl(ctx) or 'BlinkCmpKind' .. ctx.kind
770770
end,
771771
},
772772

lua/blink/cmp/config/keymap.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
---
4444
--- ['<Tab>'] = {
4545
--- function(cmp)
46-
--- if cmp.is_in_snippet() then return cmp.accept()
46+
--- if cmp.snippet_active() then return cmp.accept()
4747
--- else return cmp.select_and_accept() end
4848
--- end,
4949
--- 'snippet_forward',

lua/blink/cmp/config/sources.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ function sources.validate(config)
7171
providers = { config.providers, 'table' },
7272
})
7373
validate('sources.completion', {
74-
enabled_providers = { config.completion.enabled_providers, 'table' },
74+
enabled_providers = { config.completion.enabled_providers, { 'table', 'function' } },
7575
})
7676
for key, provider in pairs(config.providers) do
7777
validate('sources.providers.' .. key, {
7878
name = { provider.name, 'string' },
7979
module = { provider.module, 'string' },
80-
enabled = { provider.enabled, 'boolean', true },
80+
enabled = { provider.enabled, { 'boolean', 'function' }, true },
8181
opts = { provider.opts, 'table', true },
8282
transform_items = { provider.transform_items, 'function', true },
8383
should_show_items = { provider.should_show_items, { 'boolean', 'function' }, true },

lua/blink/cmp/keymap/presets.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ local presets = {
2222

2323
['<Tab>'] = {
2424
function(cmp)
25-
if cmp.is_in_snippet() then
25+
if cmp.snippet_active() then
2626
return cmp.accept()
2727
else
2828
return cmp.select_and_accept()

0 commit comments

Comments
 (0)