From 2e507e488bdb8ba2af6e1fa0297673d3d0d7aa37 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 8 Aug 2024 01:23:40 +0300 Subject: [PATCH] feat(nvim): added supermaven (AI autocompletion) --- .config/nvim/lazy-lock.json | 1 + .../nvim/lua/custom/plugins/supermaven.lua | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .config/nvim/lua/custom/plugins/supermaven.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index a9897a8..4c51a8a 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -54,6 +54,7 @@ "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "pretty_hover": { "branch": "master", "commit": "5b0688954447d65e13cba548305700b0af8d4831" }, "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, + "supermaven-nvim": { "branch": "main", "commit": "d71257f431e190d9236d7f30da4c2d659389e91f" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, diff --git a/.config/nvim/lua/custom/plugins/supermaven.lua b/.config/nvim/lua/custom/plugins/supermaven.lua new file mode 100644 index 0000000..d6a92a5 --- /dev/null +++ b/.config/nvim/lua/custom/plugins/supermaven.lua @@ -0,0 +1,40 @@ +return { + 'supermaven-inc/supermaven-nvim', + event = 'VeryLazy', + keys = { + { + 'sm', + function() + local api = require('supermaven-nvim.api') + if api.is_running() then + Notify('Enabled Supermaven', 'Supermaven') + api.stop() + else + Notify('Disabled Supermaven', 'Supermaven') + api.start() + end + end, + desc = '[S]upermaven [T]oggle', + }, + }, + opts = { + keymaps = { + accept_suggestion = '', + clear_suggestion = '', + accept_word = nil, + }, + ignore_filetypes = { + markdown = true, + ['NeogitStatus'] = true, + ['NeogitPopup'] = true, + ['NeogitCommitMessage'] = true, + }, + color = { + suggestion_color = '#ffffff', + cterm = 244, + }, + log_level = 'info', -- set to "off" to disable logging completely + disable_inline_completion = false, -- disables inline completion for use with cmp + disable_keymaps = false, + }, +}