Giter Club home page Giter Club logo

Comments (3)

maralla avatar maralla commented on July 24, 2024 2

I added a option to specify minimum characters:

let g:completor_min_chars = 2

from completor.vim.

prabirshrestha avatar prabirshrestha commented on July 24, 2024 2

The trick to make the performance better is by being smart about caching instead of using min chars or changing the omni trigger patterns.

I have implemented this trick for asyncomplete at prabirshrestha/asyncomplete.vim#3 and nvim-completion-manage also uses similar trick. It is based on my observation of how VsCode provides autocomplete. Currently asyncomplete is implemented in pure vimscript (which is supposed to be a slow at runtime) and doesn't have min_chars yet it doesn't feel slow at all. The algorithm is described in details at roxma/nvim-completion-manager#30 (comment) if you are interested in implementation for completor.vim.

from completor.vim.

markwu avatar markwu commented on July 24, 2024

I can get this work if I modified my omni trigger from

let g:completor_php_omni_trigger = '([$\w]+|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$'

to

let g:completor_php_omni_trigger = '([$\w]{2,}|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$

You can see I changed my regexp counter from + to {2,}, that means it only trigger completor.vim to complete the word more than two characters.

I know it is not a general solution, but it works for me at this moment.

from completor.vim.

Related Issues (20)

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.