look source for nvim-cmp
This is look source for hrsh7th/nvim-cmp and Shougo/ddc.vim inspired by ujihisa/neco-look.
require('cmp').setup({
sources = {
{
name = 'look',
keyword_length = 2,
option = {
convert_case = true,
loud = true
--dict = '/usr/share/dict/words'
}
}
}
})
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
\ }})
Convert the candidates to match the input characters in the case.
Convert the candidates to UPPERCASE if all input characters are uppercase.
A converter instead of option for ddc
null or specify the dict file path
"-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.
"-f" is passed Transparently to look.
Ignore the case of alphabetic characters. This is on by default if no file is specified.
- 2022-06-23 Do not pass fflag when the dictionary is set.