commit db64713c0a60aa3c7b06d9b17390fe055bd97c58
parent 225ff9758296abc229416f2d14fdb7ebb5131fdc
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date: Sat, 11 Dec 2021 18:00:46 +0100
Update to latest complementree
Diffstat:
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/lua/completree-config.lua b/lua/completree-config.lua
@@ -1,5 +1,6 @@
local comp = require"complementree"
local s = require"complementree.sources"
+local cdef = require'complementree.defaults'
local cc = require"complementree.combinators"
local ccomp = require'complementree.comparators'
local cf = require'complementree.filters'
@@ -33,19 +34,19 @@ local function md_complete(...)
if vim.fn.executable'zest' == 1 and #(vim.fn.system{ 'zest', 'search', string.format('file:%s', fullpath)}) ~= 0 then
cc.wrap(zest_complete)(...)
else
- s.ins_completion("C-F")(...)
+ cdef.ins_completion("C-F")(...)
end
end
local lsp_completion = {
- default = cc.wrap { matches = cc.combine(s.luasnip_matches, s.lsp_matches), comparator = ccomp.fzy, filter = cf.amount(6) },
- string = s.ins_completion "C-F",
- comment = s.luasnip,
+ default = cc.pipeline(cc.optional(s.lsp_matches, s.luasnip_matches), ccomp.fzy, cf.amount(6)),
+ string = cdef.ins_completion "C-F",
+ comment = cdef.luasnip,
}
comp.setup {
- default = s.ins_completion "C-N",
- vim = s.ins_completion "C-V",
+ default = cdef.ins_completion "C-N",
+ vim = cdef.ins_completion "C-V",
c = lsp_completion,
lua = lsp_completion,
rust = lsp_completion,
@@ -55,8 +56,8 @@ comp.setup {
tex = lsp_completion,
-- For git commit and text only do luasnip
- gitcommit = s.luasnip,
- text = s.luasnip,
+ gitcommit = cdef.luasnip,
+ text = cdef.luasnip,
markdown = md_complete
}
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -25,7 +25,7 @@ return packer.startup(function(use)
end
end
- -- use {'wbthomason/packer.nvim', opt = true}
+ use {'wbthomason/packer.nvim'}
-- Basic
use {
@@ -65,7 +65,7 @@ return packer.startup(function(use)
-- Misc
localuse 'vim-conf-live/pres.vim'
localuse 'vigoux/architext.nvim'
- localuse 'vigoux/complementree.nvim'
+ localuse {'vigoux/complementree.nvim', requires = {'L3MON4D3/LuaSnip', 'nvim-treesitter/nvim-treesitter', {'romgrk/fzy-lua-native', run = 'make'}} }
localuse { 'vigoux/ratatoskr.nvim', opt = true }
use 'L3MON4D3/LuaSnip'
use 'bfredl/luarefvim' -- lua docs from nvim