From 718f803be21cbdb827de06aca577ccd39deecc00 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 27 Nov 2024 12:37:27 +0100 Subject: [PATCH] nvim/lua/user/utils/cmp.lua: format fix --- nvim/lua/user/utils/cmp.lua | 58 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/nvim/lua/user/utils/cmp.lua b/nvim/lua/user/utils/cmp.lua index 3b302d2..4ddf02c 100644 --- a/nvim/lua/user/utils/cmp.lua +++ b/nvim/lua/user/utils/cmp.lua @@ -4,41 +4,41 @@ local cmp = require("cmp") local M = {} function M.selectNext(opts) - return cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item(opts or {}) - elseif hasluansp and luasnip.locally_jumpable(1) then - luasnip.jump(1) - else - fallback() - end - end, { "i", "s" }) + return cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item(opts or {}) + elseif hasluansp and luasnip.locally_jumpable(1) then + luasnip.jump(1) + else + fallback() + end + end, { "i", "s" }) end function M.selectPrev(opts) - return cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item(opts or {}) - elseif hasluansp and luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }) + return cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item(opts or {}) + elseif hasluansp and luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }) end function M.confirm(opts) - return cmp.mapping(function(fallback) - if cmp.visible() then - -- if luasnip.expand_or_jumpable() then - -- luasnip.expand_or_jump() - -- else - cmp.confirm(opts or {}) - -- end - else - fallback() - end - end) + return cmp.mapping(function(fallback) + if cmp.visible() then + -- if luasnip.expand_or_jumpable() then + -- luasnip.expand_or_jump() + -- else + cmp.confirm(opts or {}) + -- end + else + fallback() + end + end) end return M