diff --git a/lua/doom/core/keybindings/init.lua b/lua/doom/core/keybindings/init.lua index 11d551d..2ff3b9e 100644 --- a/lua/doom/core/keybindings/init.lua +++ b/lua/doom/core/keybindings/init.lua @@ -47,24 +47,22 @@ utils.map('n', '', ':WhichKey ', opts) -- If the LSP group is not disabled or the nvim-compe plugin is not disabled -- then set its mappings. if - --[[ not utils.has_value(Doom.disabled_modules, 'lsp') - and (not utils.has_value(Doom.disabled_plugins, 'compe')) ]] - functions.check_plugin('nvim-compe') + functions.check_plugin('nvim-compe', 'opt') then -- https://github.com/hrsh7th/nvim-compe#mappings - utils.map('i', ' ', vim.fn['compe#complete'](), opts) - utils.map('i', ' ', vim.fn['compe#confirm'](''), opts) - utils.map('i', ' ', vim.fn['compe#close'](''), opts) + utils.map('i', ' ', 'compe#complete()', opts) + utils.map('i', ' ', 'compe#confirm("")', opts) + utils.map('i', ' ', 'compe#close("")', opts) utils.map( 'i', ' ', - vim.fn['compe#scroll']({ delta = '+4' }), + 'compe#scroll({ "delta": +4 })', opts ) utils.map( 'i', ' ', - vim.fn['compe#scroll']({ delta = '-4' }), + 'compe#scroll({ "delta": -4 })', opts ) utils.map('n', 'gd', ':lua vim.lsp.buf.definition()', opts) -- gd: jump to definition