Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 69a8da6

Browse files
committed
fix: README update and some slightly fix
1 parent 6354de7 commit 69a8da6

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![Build Status](https://travis-ci.com/haorenW1025/completion-nvim.svg?branch=master)](https://travis-ci.com/haorenW1025/completion-nvim)
12
[![Gitter](https://badges.gitter.im/completion-nvim/community.svg)](https://gitter.im/completion-nvim/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
23
# completion-nvim
34

@@ -147,6 +148,18 @@ let g:completion_enable_auto_hover = 0
147148
let g:completion_enable_auto_signature = 0
148149
```
149150

151+
152+
153+
### Enable/Disable fuzzy match
154+
- By default fuzzy match is disable, you can enable it by
155+
156+
```vim
157+
let g:completion_enable_fuzzy_match = 1
158+
```
159+
160+
*NOTE* Fuzzy match highly dependent on what language server you're using. It might not
161+
work as you expect on some language server.
162+
150163
### Max Items for completion
151164

152165
- You can set a number limit for the maximum completion items. For example, if you

lua/completion/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function M.text_document_completion_list_to_complete_items(result, prefix, score
7575
}
7676
local kind = protocol.CompletionItemKind[completion_item.kind]
7777
local priority = vim.g.completion_items_priority[kind] or 1
78-
if vim.g.completion_fuzzy_match == 1 then
78+
if vim.g.completion_enable_fuzzy_match == 1 then
7979
local score = score_func(prefix, word)
8080
if score <= 1 then
8181
table.insert(matches, {

plugin/completion.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if ! exists('g:completion_max_items')
7474
endif
7575

7676
if ! exists('g:completion_fuzzy_match')
77-
let g:completion_fuzzy_match = 1
77+
let g:completion_enable_fuzzy_match = 0
7878
endif
7979

8080
if ! exists('g:completion_chain_complete_list')

0 commit comments

Comments
 (0)