From eb0b879bea2500ae893f8abfed8f9597c8ba3d11 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 18 Jul 2024 21:54:27 -0400 Subject: [PATCH] fix(nvim): re-enable luasnip --- pkgs/nvim/config/completion/cmp.nix | 5 +++++ pkgs/nvim/config/default.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/nvim/config/completion/cmp.nix b/pkgs/nvim/config/completion/cmp.nix index 7b45ef2..c6824e5 100644 --- a/pkgs/nvim/config/completion/cmp.nix +++ b/pkgs/nvim/config/completion/cmp.nix @@ -28,12 +28,16 @@ }) ''; }; + snippet = { + expand = "function(args) require('luasnip').lsp_expand(args.body) end"; + }; sources = { __raw = '' cmp.config.sources({ {name = 'nvim_lsp'}, {name = 'copilot'}, {name = 'path'}, + {name = 'luasnip'}, {name = 'cmdline'}, }, { {name = 'buffer'}, @@ -69,6 +73,7 @@ cmp-path.enable = true; }; extraConfigLua = '' + luasnip = require("luasnip") kind_icons = { Text = "󰊄", Method = "", diff --git a/pkgs/nvim/config/default.nix b/pkgs/nvim/config/default.nix index 59a39ca..eb3f2a8 100644 --- a/pkgs/nvim/config/default.nix +++ b/pkgs/nvim/config/default.nix @@ -38,7 +38,7 @@ ./none-ls/none-ls.nix - # ./snippets/luasnip.nix + ./snippets/luasnip.nix ./statusline/lualine.nix