From 504ee3009df78cfb7e225c8882e7826920c4fdca Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 21 Mar 2024 17:20:44 +0900 Subject: feat(cmp)!: replace luasnip with native snippets --- fnl/nvrc/packs/cmp.fnl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fnl/nvrc/packs/cmp.fnl') diff --git a/fnl/nvrc/packs/cmp.fnl b/fnl/nvrc/packs/cmp.fnl index b49a1c8..11595d1 100644 --- a/fnl/nvrc/packs/cmp.fnl +++ b/fnl/nvrc/packs/cmp.fnl @@ -8,7 +8,6 @@ : select_prev_item} (require :cmp)) (local under-compare (require :cmp-under-comparator)) (local clangd-score (require :clangd_extensions.cmp_scores)) -(local luasnip (require :luasnip)) (set! completeopt "menuone,noselect") @@ -39,7 +38,7 @@ :TypeParameter "(tp)"}) (setup {:snippet {:expand (fn [args] - ((. (require :luasnip) :lsp_expand) args.body))} + (vim.snippet.expand args.body))} :formatting {:format (fn [entry vim-item] (set vim-item.kind (string.format "%s %s" @@ -61,11 +60,11 @@ :select false}) [:i :c]) : (mapping {:i (fn [fallback] (if (visible) (select_next_item) - (luasnip.expand_or_jumpable) (luasnip.expand_or_jump) + (vim.snippet.jumpable 1) (vim.snippet.jump 1) (fallback)))}) : (mapping {:i (fn [fallback] (if (visible) (select_next_item) - (luasnip.jumpable -1) (luasnip.jump -1) + (vim.snippet.jumpable -1) (vim.snippet.jump -1) (fallback)))})} :sources [{:name :nvim_lsp} {:name :nvim_lsp_signature_help}] -- cgit 1.4.1