Git Product home page Git Product logo

Comments (10)

Shougo avatar Shougo commented on July 20, 2024 1
inoremap <expr><C-Space>        neocomplete#start_manual_complete('omni')

Yes, you can.

from neocomplete.vim.

Shougo avatar Shougo commented on July 20, 2024

You can use PHP omni function in neocomplete.
But it is too slow.

        if !exists('g:neocomplete#sources#omni#input_patterns')
          let g:neocomplete#sources#omni#input_patterns = {}
        endif
        let g:neocomplete#sources#omni#input_patterns.php =
        \ '[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'

from neocomplete.vim.

markwu avatar markwu commented on July 20, 2024

I did the same settings. The completion works when I typed after -> and ::, but not works when I just type like "set_"..., I have to hit <c-x><c-o> to get the php completion.

from neocomplete.vim.

Shougo avatar Shougo commented on July 20, 2024
let g:neocomplete#sources#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'

If you set this settings, you can use full completion. But it is too heavy.
I don't recommend it.

from neocomplete.vim.

markwu avatar markwu commented on July 20, 2024

Great thanks. I tried it, it works as I want. But, you said you don't recommend it, so, what is the best practice for my purpose? Using dictionary/keyword for native php function completion?

from neocomplete.vim.

Shougo avatar Shougo commented on July 20, 2024

PHP omni completion is too slow.
So,

  1. Create other completion for PHP
  2. Using dictionary completion

from neocomplete.vim.

markwu avatar markwu commented on July 20, 2024

I tried https://github.com/shawncplus/phpcomplete.vim with neocomplete, the performance seems acceptable.

from neocomplete.vim.

Shougo avatar Shougo commented on July 20, 2024

OK. I will add it in the documentation.

from neocomplete.vim.

markwu avatar markwu commented on July 20, 2024

Is that possible I set the omni pattern like this

let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'

This setting will pop up neocomplete after -> and ::

But, when I click, for example <ctrl-space>, it will pop up omni completion through neocomplete at any time. So, I can click <ctrl-space> after 'set_' to get omni complete for patterns like '\h\w*'

YouCompleteMe has this feature. If neocomplete can do the same, then we don't need to worry about the some heavy completions like php or ruby?

from neocomplete.vim.

markwu avatar markwu commented on July 20, 2024

Wow ...amazing. I really like it. It just works like YouCompleteMe, and the performance is quite acceptable with https://github.com/shawncplus/phpcomplete.vim.

Great thanks.

from neocomplete.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.