From baae94abb6a9a03914216f0f373b7b0f6b0207bd Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 19 Sep 2026 01:40:50 +0530 Subject: chore: removed all raw string configurations options in favor of files Moved all configurations which were previously raw strings chunks, for options that the home-manager options didn't provide, into files for that specific configuration and reading there contents instead (with string replacement for passing information from the rest of the configuration). --- modules/development/nixvim/plugins/cmp/default.nix | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/development/nixvim/plugins/cmp/default.nix (limited to 'modules/development/nixvim/plugins/cmp/default.nix') diff --git a/modules/development/nixvim/plugins/cmp/default.nix b/modules/development/nixvim/plugins/cmp/default.nix new file mode 100644 index 0000000..4698801 --- /dev/null +++ b/modules/development/nixvim/plugins/cmp/default.nix @@ -0,0 +1,28 @@ +# Completion plugin for auto-completion +{ config, lib, ... }: +{ + config.programs.nixvim.plugins.cmp = lib.mkIf config.development.nixvim.enable { + enable = true; + autoEnableSources = true; + settings = { + snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.scroll_docs(-4)"; # scroll docs up + "" = "cmp.mapping.scroll_docs(4)"; # scroll docs down + + "" = builtins.readFile ./escape.lua; + }; + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; + }; +} -- cgit v1.2.3