diff --git a/lazy-lock.json b/lazy-lock.json index ee069923..ad37a758 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,6 +4,7 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "codeium.vim": { "branch": "main", "commit": "31dd2962c81759be007895db6ce089feec397c86" }, "conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" }, "copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" }, "fidget.nvim": { "branch": "main", "commit": "a1493d94ecb3464ab3ae4d5855765310566dace4" }, diff --git a/lua/custom/plugins/autopairs.lua b/lua/custom/plugins/autopairs.lua index a9a5f163..529c3308 100644 --- a/lua/custom/plugins/autopairs.lua +++ b/lua/custom/plugins/autopairs.lua @@ -1,15 +1,12 @@ return { - "windwp/nvim-autopairs", - -- Optional dependency - dependencies = { 'hrsh7th/nvim-cmp' }, - config = function() - require("nvim-autopairs").setup {} - -- If you want to automatically add `(` after selecting a function or method - local cmp_autopairs = require('nvim-autopairs.completion.cmp') - local cmp = require('cmp') - cmp.event:on( - 'confirm_done', - cmp_autopairs.on_confirm_done() - ) - end, + 'windwp/nvim-autopairs', + -- Optional dependency + dependencies = { 'hrsh7th/nvim-cmp' }, + config = function() + require('nvim-autopairs').setup {} + -- If you want to automatically add `(` after selecting a function or method + local cmp_autopairs = require 'nvim-autopairs.completion.cmp' + local cmp = require 'cmp' + cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) + end, } diff --git a/lua/custom/plugins/codeium.lua b/lua/custom/plugins/codeium.lua new file mode 100644 index 00000000..39fc6bdd --- /dev/null +++ b/lua/custom/plugins/codeium.lua @@ -0,0 +1,25 @@ +return { + 'Exafunction/codeium.vim', + -- event = 'BufEnter', + config = function() + vim.keymap.set('i', '', function() + return vim.fn['codeium#Accept']() + end, { expr = true, silent = true }) + + vim.keymap.set('i', '', function() + return vim.fn['codeium#CycleCompletions'](1) + end, { expr = true, silent = true }) + + vim.keymap.set('i', '', function() + return vim.fn['codeium#CycleCompletions'](-1) + end, { expr = true, silent = true }) + + vim.keymap.set('i', '', function() + return vim.fn['codeium#Clear']() + end, { expr = true, silent = true }) + + vim.keymap.set('i', '', function() + return vim.fn['codeium#Complete']() + end, { expr = true, silent = true }) + end, +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua index 94fe6aa5..d420862e 100644 --- a/lua/custom/plugins/oil.lua +++ b/lua/custom/plugins/oil.lua @@ -1,15 +1,15 @@ -- use `nvim .` or `knv .` to open neovim with this active return { - 'stevearc/oil.nvim', - opts = { - view_options = { - -- Show files and directories that start with "." - show_hidden = true, - } - }, - -- Optional dependencies - dependencies = { "nvim-tree/nvim-web-devicons" }, + 'stevearc/oil.nvim', + opts = { + view_options = { + -- Show files and directories that start with "." + show_hidden = true, + }, + }, + -- Optional dependencies + dependencies = { 'nvim-tree/nvim-web-devicons' }, - -- set keymap for opening Oil file explorer - vim.keymap.set({ 'n' }, 'oe', ':Oil', { desc = 'Open Oil file explorer', silent = true }) + -- set keymap for opening Oil file explorer + vim.keymap.set({ 'n' }, 'oe', ':Oil', { desc = 'Open Oil file explorer', silent = true }), }