;; Configuration for completion plugin. (module config.cmp {autoload {nvim aniseed.nvim : util}}) (let [cmp (util.load-plugin :cmp) lspkind (util.load-plugin :lspkind) luasnip (util.load-plugin :luasnip) luasnip-vscode (require :luasnip/loaders/from_vscode)] (luasnip-vscode.lazy_load) (lspkind.init) (cmp.setup {:snippet {:expand (fn [args] (luasnip.lsp_expand args.body))} :mapping (cmp.mapping.preset.insert {: (cmp.mapping.select_prev_item) : (cmp.mapping.select_next_item) : (cmp.mapping (cmp.mapping.scroll_docs -1) [:i :c]) : (cmp.mapping (cmp.mapping.scroll_docs 1) [:i :c]) : (cmp.mapping (cmp.mapping.complete) [:i :c]) : (cmp.mapping {:i (cmp.mapping.abort) :c (cmp.mapping.close)}) : (cmp.mapping.confirm {:select true}) : (cmp.mapping.confirm {:select true})}) :sources [{:name :nvim_lsp} {:name :nvim_lua} {:name :luasnip} {:name :spell} {:name :buffer :keyword_length 4} {:name :path :keyword_length 6}] :formatting {:format (lspkind.cmp_format {:with_text true :menu {:buffer "" :nvim_lsp "" :nvim_lua "" :path "" :luasnip ""}})} :window {:documentation {:border ["╭" "─" "╮" "│" "╯" "─" "╰" "│"]}} :confirm_opts {:behavior cmp.ConfirmBehavior.Replace :select false} :experimental {:ghost_text false :native_menu false}}))