diff options
author | LostNeophyte <[email protected]> | 2023-01-25 20:35:07 +0100 |
---|---|---|
committer | LostNeophyte <[email protected]> | 2023-01-25 20:35:14 +0100 |
commit | bfe8ee9cba642525a5bbbe0b27f6049ba9ee1ef4 (patch) | |
tree | a8090330ae29bcb109ec3690b9226b837d799a37 /lua/lvim/config/_deprecated.lua | |
parent | 75b653cc623a8cd6de397e42f21b838a065eb0e0 (diff) |
fix: don't overriding user's config
Diffstat (limited to 'lua/lvim/config/_deprecated.lua')
-rw-r--r-- | lua/lvim/config/_deprecated.lua | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lua/lvim/config/_deprecated.lua b/lua/lvim/config/_deprecated.lua index 5ce851c2..d2a86e9f 100644 --- a/lua/lvim/config/_deprecated.lua +++ b/lua/lvim/config/_deprecated.lua @@ -134,9 +134,26 @@ end M.post_builtin = { -- example: - -- which_key = function () - -- - -- end + cmp = function() + local builtin = "cmp" + local table = lvim.builtin[builtin] + local allowed_keys = { active = true, on_config = true, on_config_done = true, opts = true } + for key, value in pairs(table) do + if not allowed_keys[key] then + vim.schedule(function() + vim.notify( + string.format( + "`lvim.builtin.%s.%s` is deprecated, use `lvim.builtin.%s.opts.%s` instead", + builtin, + key, + builtin, + key + ) + ) + end) + end + end + end, } return M |