From 2644df6d7c3131a50ce02b0817ed443812ed02a2 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 30 Sep 2024 19:02:41 -0400 Subject: [PATCH] Added supermaven autocompletion --- README.md | 1 - config/lsp.nix | 1 + config/plugins.nix | 24 ++++++++++++++++++++++++ config/sets.nix | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 config/plugins.nix diff --git a/README.md b/README.md index 8d76437..8a9cb3c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ nix run github:fred-drake/neovim#. ## Things To Do -- TODO: Add supermaven autocompletion. - TODO: Implement DAP for debugging - TODO: Change fzf to only allow git-level root if applicable - TODO: Break up LSP, CMP and Tree-Sitter for lanuages like rust, go, etc. diff --git a/config/lsp.nix b/config/lsp.nix index 4e152a4..633bae8 100644 --- a/config/lsp.nix +++ b/config/lsp.nix @@ -16,6 +16,7 @@ in { pkgs, ... }: { name = "buffer"; keywordLength = 3; } + { name = "supermaven"; } ]; snippet.expand = diff --git a/config/plugins.nix b/config/plugins.nix new file mode 100644 index 0000000..1d11576 --- /dev/null +++ b/config/plugins.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: { + extraPlugins = [ pkgs.vimPlugins.supermaven-nvim ]; + + extraConfigLua = '' + require("supermaven-nvim").setup({ + keymaps = { + accept_suggestion = "", + clear_suggestion = "", + accept_word = "", + }, + ignore_filetypes = { cpp = true }, -- or { "cpp", } + 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, -- disables built in keymaps for more manual control + condition = function() + return false + end -- condition to check for stopping supermaven, `true` means to stop supermaven when the condition is true. + }) + ''; +} diff --git a/config/sets.nix b/config/sets.nix index 60ba1b4..c58e3ef 100644 --- a/config/sets.nix +++ b/config/sets.nix @@ -82,7 +82,7 @@ treesitter = { enable = true; - folding = true; + folding = false; settings.indent.enable = true; };