https://github.com/octaltree/cmp-look
https://github.com/octaltree/cmp-look
ddc-source ddc-vim nvim-cmp
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/octaltree/cmp-look
- Owner: octaltree
- License: mit
- Created: 2021-08-09T06:56:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-24T08:01:57.000Z (over 2 years ago)
- Last Synced: 2025-04-14T16:16:36.273Z (about 1 year ago)
- Topics: ddc-source, ddc-vim, nvim-cmp
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 94
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# look source for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
This is [look](https://man7.org/linux/man-pages/man1/look.1.html) source for
[hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp) and
[Shougo/ddc.vim](https://github.com/Shougo/ddc.vim) inspired by
[ujihisa/neco-look](https://github.com/ujihisa/neco-look).

## For nvim-cmp
```lua
require('cmp').setup({
sources = {
{
name = 'look',
keyword_length = 2,
option = {
convert_case = true,
loud = true
--dict = '/usr/share/dict/words'
}
}
}
})
```
## For ddc
```vim
call ddc#custom#patch_global('sources', ['look'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {'matchers': ['matcher_head']},
\ 'look': {'converters': ['loud', 'matcher_head'], 'matchers': [], 'mark': 'l', 'isVolatile': v:true}
\ })
call ddc#custom#patch_global('sourceParams', {
\ 'look': {
\ 'convertCase': v:true,
\ 'dict': v:null
\ }})
```
## Configuration options
### convert_case cmp/ convertCase ddc (type: boolean)
Convert the candidates to match the input characters in the case.
### loud cmp (type: boolean)
Convert the candidates to UPPERCASE if all input characters are uppercase.
### loud ddc (converter)
A converter instead of option for ddc
### dict cmp ddc (type: null|string)
null or specify the dict file path
### dflag cmp ddc (type: boolean)
"-d" is passed Transparently to look. Remove non-alphanumeric characters from
keywords and recalculate keyword_length.
> Use normal dictionary character set and order, i.e., only blanks and
> alphanumeric characters are compared. This is on by default if no file is
> specified.
### fflag cmp ddc (type: boolean)
"-f" is passed Transparently to look.
> Ignore the case of alphabetic characters. This is on by default if no file is
> specified.
## Breaking Changes
- 2022-06-23 Do not pass fflag when the dictionary is set.
## Alternatives
- [ujihisa/neco-look](https://github.com/ujihisa/neco-look)
- [matsui54/ddc-dictionary](https://github.com/matsui54/ddc-dictionary)