From 0b7b1684d87b7d0b01b5645713b413e317699fd0 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Tue, 22 Oct 2024 23:40:30 -0500 Subject: readme --- fnl/plugins/cmp.fnl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 fnl/plugins/cmp.fnl (limited to 'fnl/plugins/cmp.fnl') diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl new file mode 100644 index 0000000..8d13986 --- /dev/null +++ b/fnl/plugins/cmp.fnl @@ -0,0 +1,23 @@ +(local cmp (require :cmp)) + +((. cmp :setup) { + :snippet { + :expand (fn [args] + (vim.snippet.expand args.body) + ;((. vim.fn "vsnip#anonymous") args.body) ;for older neovim version (< 0.10) + )} + :mapping (cmp.mapping.preset.insert { + : (cmp.mapping.scroll_docs -4) + : (cmp.mapping.scroll_docs 4) + : (cmp.mapping.complete) + : (cmp.mapping.abort) + : (cmp.mapping.confirm {select true}) + : (cmp.mapping (cmp.mapping.select_next_item) [:i :s]) + }) + :sources (cmp.config.sources [ + {:name :nvim_lsp} + ;{:name :vsnip} + ] [{:name :buffer}]) + }) + + -- cgit v1.2.3