summaryrefslogtreecommitdiff
path: root/lua/blink/cmp/config/completion/ghost_text.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/blink/cmp/config/completion/ghost_text.lua')
-rw-r--r--lua/blink/cmp/config/completion/ghost_text.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/blink/cmp/config/completion/ghost_text.lua b/lua/blink/cmp/config/completion/ghost_text.lua
new file mode 100644
index 0000000..47fb2cd
--- /dev/null
+++ b/lua/blink/cmp/config/completion/ghost_text.lua
@@ -0,0 +1,19 @@
+--- Displays a preview of the selected item on the current line
+--- @class (exact) blink.cmp.CompletionGhostTextConfig
+--- @field enabled boolean
+
+local validate = require('blink.cmp.config.utils').validate
+local ghost_text = {
+ --- @type blink.cmp.CompletionGhostTextConfig
+ default = {
+ enabled = false,
+ },
+}
+
+function ghost_text.validate(config)
+ validate('completion.ghost_text', {
+ enabled = { config.enabled, 'boolean' },
+ }, config)
+end
+
+return ghost_text