diff options
Diffstat (limited to 'fnl/plugins/cmp.fnl')
-rw-r--r-- | fnl/plugins/cmp.fnl | 23 |
1 files changed, 23 insertions, 0 deletions
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 { + :<C-b> (cmp.mapping.scroll_docs -4) + :<C-f> (cmp.mapping.scroll_docs 4) + :<C-Space> (cmp.mapping.complete) + :<C-e> (cmp.mapping.abort) + :<CR> (cmp.mapping.confirm {select true}) + :<Tab> (cmp.mapping (cmp.mapping.select_next_item) [:i :s]) + }) + :sources (cmp.config.sources [ + {:name :nvim_lsp} + ;{:name :vsnip} + ] [{:name :buffer}]) + }) + + |