From 9ccd2568dd7adc86afdaa22fef78817039ccadd7 Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 4 May 2024 16:13:13 +0800 Subject: [PATCH] update --- README.md | 34 +++++++++++++++++++--------------- lua/epo/init.lua | 1 + 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f91b42f..af25e85 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,25 @@ Blazingly fast, minimal lsp auto-completion and snippet plugin for neovim. -- the default completetopt set by epo vim.opt.completeopt = "menu,menuone,noselect,popup" --- default settings -require('epo').setup({ - -- fuzzy match - fuzzy = false, - -- increase this value can aviod trigger complete when delete character. - debounce = 50, - -- when completion confrim auto show a signature help floating window. - signature = false, - -- border for lsp signature popup, :h nvim_open_win - signature_border = 'rounded', - -- lsp kind formatting, k is kind string "Field", "Struct", "Keyword" etc. - kind_format = function(k) - return k:lower():sub(1, 1) - end -}) +-- use default settings +require('epo').setup() +``` + +options in setup param with default value + +```lua +-- fuzzy match +fuzzy = false, +-- increase this value can aviod trigger complete when delete character. +debounce = 50, +-- when completion confrim auto show a signature help floating window. +signature = false, +-- border for lsp signature popup, :h nvim_open_win +signature_border = 'rounded', +-- lsp kind formatting, k is kind string "Field", "Struct", "Keyword" etc. +kind_format = function(k) + return k:lower():sub(1, 1) +end ``` You may want to pass the capabilities to your lsp diff --git a/lua/epo/init.lua b/lua/epo/init.lua index 9409568..3540d7f 100644 --- a/lua/epo/init.lua +++ b/lua/epo/init.lua @@ -533,6 +533,7 @@ local function register_cap() end local function setup(opt) + opt = opt or {} match_fuzzy = opt.fuzzy or false debounce_time = opt.debounce_time or 50 signature = opt.signature or false