Skip to content

Commit

Permalink
feat(cmp): add friendly snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyxels committed Dec 13, 2024
1 parent ecd72c4 commit c4a697b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions config/cmp.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
plugins = {
cmp = {
enable = true;
Expand Down Expand Up @@ -41,9 +41,9 @@
end, { 'i', 's' })";
};
sources = [
{name = "luasnip";}
{name = "nvim_lsp";}
{name = "crates";}
{name = "luasnip";}
{name = "path";}
];
snippet.expand = ''function(args) require('luasnip').lsp_expand(args.body) end'';
Expand All @@ -56,6 +56,15 @@
region_check_events = "CursorHold,InsertLeave";
delete_check_events = "TextChanged,InsertEnter";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
filetypeExtend = {
typescript = ["javascript"];
};
};
};
}

0 comments on commit c4a697b

Please sign in to comment.