Giter Site home page Giter Site logo

deoplete-dictionary's Introduction

deoplete-dictionary

deoplete source for dictionary

Description

This source collects "keyword_patterns" keywords from 'dictionary'.

Note: It uses buffer-local 'dictionary' set up.

Note: It also supports directory.

rank: 100

Configuration examples

" Sample configuration for dictionary source with multiple
" dictionary files.
setlocal dictionary+=/usr/share/dict/words
setlocal dictionary+=/usr/share/dict/american-english
" Remove this if you'd like to use fuzzy search
call deoplete#custom#source(
\ 'dictionary', 'matchers', ['matcher_head'])
" If dictionary is already sorted, no need to sort it again.
call deoplete#custom#source(
\ 'dictionary', 'sorters', [])
" Do not complete too short words
call deoplete#custom#source(
\ 'dictionary', 'min_pattern_length', 4)

deoplete-dictionary's People

Contributors

shougo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

oneastok

deoplete-dictionary's Issues

completion with upper case

With ignorecase on, when I type Elep I correctly see elephant as an option. However, when I complete with it, elephant is used, i.e. my case is removed. Expected behaviour is completing as Elephant.

Am I missing an option, or is this something deoplete doesn't support? For now I've just quickly added it as part of my hack for #1, and it works as expected - basically, return [{'word': start + w[len(start):]'} ....

performance improvements?

I tried this out and completion for a 100k dictionary is surprisingly slow - say half a second. I quickly hacked something where I did the filtering in gather_candidates (something like return [{'word': w} for w in candidates if w.startswith(context['complete_str'])) and it's nearly instant and seems to work fine. This surprises me, as I thought matcher_head would be doing the same thing.

Does anyone

  1. see why the current implementation is so much slower?
  2. object to having an implementation similar to the above as a PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.