Updates to LSP and cmp plugins

This commit is contained in:
Proctor
2022-04-05 16:16:15 -05:00
parent bc23f46cb2
commit e553b3d078
4 changed files with 60 additions and 7 deletions

View File

@@ -92,7 +92,7 @@
(a.map-indexed set-opt val-based-opts) (a.map-indexed set-opt val-based-opts)
(nvim.ex.syntax "on") (nvim.ex.syntax "on")
(nvim.ex.colorscheme :solarized8) (nvim.ex.colorscheme :soluarized)

View File

@@ -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 {:<C-p> (cmp.mapping.select_prev_item)
:<C-n> (cmp.mapping.select_next_item)
:<C-b> (cmp.mapping.scroll_docs (- 4))
:<C-f> (cmp.mapping.scroll_docs 4)
:<C-Space> (cmp.mapping.complete)
:<C-e> (cmp.mapping.close)
:<CR> (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert
:select true})}
:snippet {:expand (fn [args]
(nvim.fn.vsnip#anonymous args.body))}
:sources cmp-srcs}))
;;; imap <expr> <C-j> vsnip#available(1) ? '<Plug>(vsnip-expand)' : '<C-j>'
;;; imap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
;;; smap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'

View File

@@ -24,10 +24,14 @@
:text sign :text sign
:numhl sign-level}))) :numhl sign-level})))
(define-sign :Error "☢️") ; (define-sign :Error "☢️")
(define-sign :Warn "⚠️") ; (define-sign :Warn "⚠️")
(define-sign :SignHint "🔎") ; (define-sign :SignHint "🔎")
(define-sign :Info "") ; (define-sign :Info "")
(define-sign :Error "X")
(define-sign :Warn "!")
(define-sign :SignHint "?")
(define-sign :Info "i")
(def core-nmappings (def core-nmappings
{ {

View File

@@ -36,7 +36,15 @@
:clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies :clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies
:folke/lsp-colors.nvim {} :folke/lsp-colors.nvim {}
:hashivim/vim-terraform {} ; Terraform :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 :jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs
:junegunn/vim-easy-align {:mod :easyalign} :junegunn/vim-easy-align {:mod :easyalign}
:kovisoft/paredit {} :kovisoft/paredit {}
@@ -49,7 +57,6 @@
:p00f/nvim-ts-rainbow {} :p00f/nvim-ts-rainbow {}
:radenling/vim-dispatch-neovim {} ; Clojure :radenling/vim-dispatch-neovim {} ; Clojure
:skywind3000/asyncrun.vim {} ; :AsyncRun :skywind3000/asyncrun.vim {} ; :AsyncRun
:tami5/compe-conjure {} ; autocomplete using conjure as a source
:tpope/vim-classpath {} :tpope/vim-classpath {}
:tpope/vim-dadbod {} :tpope/vim-dadbod {}
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies :tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies