about summary refs log tree commit diff stats
path: root/modules/by-name
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name')
-rw-r--r--modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix25
1 files changed, 5 insertions, 20 deletions
diff --git a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix
index d3a20300..315f3fc7 100644
--- a/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix
+++ b/modules/by-name/nv/nvim/plgs/nvim-cmp/default.nix
@@ -66,32 +66,17 @@ in {
     ];
 
     plugins.cmp = {
-      /*
-      TODO: integrate this:
-      ```lua
-        enabled = {
-        function()
-            -- disable completion in comments
-            local context = require 'cmp.config.context'
-            -- keep command mode completion enabled when cursor is in a comment
-            -- te
-            if vim.api.nvim_get_mode().mode == 'c' then
-                return true
-            else
-                return not context.in_treesitter_capture("comment")
-                    and not context.in_syntax_group("Comment")
-            end
-        end
-        },
-      ```
-      */
       enable = true;
       autoEnableSources = true;
 
       settings = {
         mapping = {};
 
-        snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
+        snippet.expand.__raw = ''
+          function(args)
+            require('luasnip').lsp_expand(args.body)
+          end
+        '';
 
         sources = [
           {name = "nvim_lsp";}