diff --git a/nvim/.config/nvim/fnl/dotfiles/core.fnl b/nvim/.config/nvim/fnl/dotfiles/core.fnl index 8a29c91..acf8899 100644 --- a/nvim/.config/nvim/fnl/dotfiles/core.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/core.fnl @@ -92,7 +92,7 @@ (a.map-indexed set-opt val-based-opts) (nvim.ex.syntax "on") -(nvim.ex.colorscheme :solarized8) +(nvim.ex.colorscheme :soluarized) diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/cmp.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/cmp.fnl new file mode 100644 index 0000000..8500b4a --- /dev/null +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/cmp.fnl @@ -0,0 +1,42 @@ +(module dotfiles.plugin.cmp + {autoload {nvim aniseed.nvim}}) + + +(module config.plugin.cmp + {autoload {nvim aniseed.nvim + cmp cmp}}) + +(def- cmp-src-menu-items + {:buffer "buff" + :conjure "conj" + :nvim_lsp "lsp"}) + +(def- cmp-srcs + [{:name :nvim_lsp} + {:name :vsnip} + {:name :conjure} + {:name :buffer}]) + +;; Setup cmp with desired settings +(let [cmp (require :cmp)] + (cmp.setup {:formatting + {:format (fn [entry item] + (set item.menu (or (. cmp-src-menu-items entry.source.name) "")) + item)} + :mapping {: (cmp.mapping.select_prev_item) + : (cmp.mapping.select_next_item) + : (cmp.mapping.scroll_docs (- 4)) + : (cmp.mapping.scroll_docs 4) + : (cmp.mapping.complete) + : (cmp.mapping.close) + : (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert + :select true})} + + :snippet {:expand (fn [args] + (nvim.fn.vsnip#anonymous args.body))} + :sources cmp-srcs})) + + +;;; imap vsnip#available(1) ? '(vsnip-expand)' : '' +;;; imap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' +;;; smap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl index b445df7..b9304f8 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl @@ -24,10 +24,14 @@ :text sign :numhl sign-level}))) -(define-sign :Error "☢️") -(define-sign :Warn "⚠️") -(define-sign :SignHint "🔎") -(define-sign :Info "ℹ️") +; (define-sign :Error "☢️") +; (define-sign :Warn "⚠️") +; (define-sign :SignHint "🔎") +; (define-sign :Info "ℹ️") +(define-sign :Error "X") +(define-sign :Warn "!") +(define-sign :SignHint "?") +(define-sign :Info "i") (def core-nmappings { diff --git a/nvim/.config/nvim/fnl/dotfiles/plugins.fnl b/nvim/.config/nvim/fnl/dotfiles/plugins.fnl index d56969e..109aeaa 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugins.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugins.fnl @@ -36,7 +36,15 @@ :clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies :folke/lsp-colors.nvim {} :hashivim/vim-terraform {} ; Terraform - :hrsh7th/nvim-compe {:mod :compe} ; autocomplete + :hrsh7th/nvim-cmp {:requires [:hrsh7th/cmp-buffer + :hrsh7th/cmp-nvim-lsp + :hrsh7th/cmp-vsnip + :hrsh7th/vim-vsnip-integ + :PaterJason/cmp-conjure] + :mod :cmp} ; autocomplete + :hrsh7th/vim-vsnip {} + :hrsh7th/vim-vsnip-integ {} + :Iron-E/nvim-soluarized {} :jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs :junegunn/vim-easy-align {:mod :easyalign} :kovisoft/paredit {} @@ -49,7 +57,6 @@ :p00f/nvim-ts-rainbow {} :radenling/vim-dispatch-neovim {} ; Clojure :skywind3000/asyncrun.vim {} ; :AsyncRun - :tami5/compe-conjure {} ; autocomplete using conjure as a source :tpope/vim-classpath {} :tpope/vim-dadbod {} :tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies