Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matsui54/ddc-filter_editdistance
Ddc.vim filter which uses edit distance for matching and sorting candidates.
https://github.com/matsui54/ddc-filter_editdistance
ddc-filter ddc-vim
Last synced: 2 months ago
JSON representation
Ddc.vim filter which uses edit distance for matching and sorting candidates.
- Host: GitHub
- URL: https://github.com/matsui54/ddc-filter_editdistance
- Owner: matsui54
- License: mit
- Created: 2021-08-11T13:17:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T08:28:37.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T17:40:03.579Z (5 months ago)
- Topics: ddc-filter, ddc-vim
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ddc-filter_editdistance
Ddc.vim filter which uses edit distance for matching and sorting candidates.
## Required
### denops.vim
https://github.com/vim-denops/denops.vim
### ddc.vim
https://github.com/Shougo/ddc.vim
## filters
### matcher_editdistance
It removes candidates which has greater edit distance than threshold. This also
sorts candidates by editdistance.### sorter_editdistance
It only sort candidates by edit distance. I recommend using only
matcher_editdistance.## Configuration
### params of matcher_editdistance
- limit: (number) Candidates whose edit distance exceed this value are ignored.
(default: 3)
- diffLen: (number) If candidates' length is smaller than (users' input +
params.diffLen), the candidates are ignored. (default: -1)
- showScore: (boolean) If it is true, edit distance is shown in completion menu.
(default: false)### examples
```vim
call ddc#custom#patch_global('sourceOptions', {
\ '_': {'matchers': ['matcher_editdistance'], 'sorters': []},
\ })call ddc#custom#patch_global('filterParams', {
\ 'matcher_editdistance': {'showScore': v:true, 'diffLen': 0, 'limit': 2},
\ })
```