Git Product home page Git Product logo

Comments (10)

roxma avatar roxma commented on July 22, 2024 1

And after "$this->" I can see that automatically it's being called, but there is some kind of error:

It is important to keep the ncm2#on_complete#omni in the on_complete field.

from ncm2-phpactor.

roxma avatar roxma commented on July 22, 2024

How can I set up ncm2 in order to trigger automatically the phpactor suggestions instead of the default ones?

Remove this plugin.

Read the css example in ncm2 README. You might also need :help ncm2#register_source.

from ncm2-phpactor.

dantleech avatar dantleech commented on July 22, 2024

From the screen shot, this plugin is returning the phpactor suggestions. The omni-complete suggestions are the same? ncm2 does not, by default, complete PHP.

from ncm2-phpactor.

fcojavierdomenech avatar fcojavierdomenech commented on July 22, 2024

From the screen shot, this plugin is returning the phpactor suggestions. The omni-complete suggestions are the same? ncm2 does not, by default, complete PHP.

The first image is what I think omni-complete, second (pressing <C-x><C-o>) phpactor. The look different despite both are perfectly valid

from ncm2-phpactor.

dantleech avatar dantleech commented on July 22, 2024

Yep that's expected. One is using native VIM omni-complete, the other ncm2 (both are using Phactor underneath)

from ncm2-phpactor.

fcojavierdomenech avatar fcojavierdomenech commented on July 22, 2024

How can I set up ncm2 in order to trigger automatically the phpactor suggestions instead of the default ones?

Remove this plugin.

Read the css example in ncm2 README. You might also need :help ncm2#register_source.

I removed 'phpactor/ncm2-phpactor', then in my vimrc:

autocmd FileType php setlocal omnifunc=phpactor#Complete

au User Ncm2Plugin call ncm2#register_source({
            \ 'name' : 'php',
            \ 'priority': 9, 
            \ 'subscope_enable': 1,
            \ 'scope': ['php'],
            \ 'mark': 'php',
            \ 'word_pattern': '[\w\-]+',
            \ 'complete_pattern': ['->'],
            \ 'on_complete': ['phpactor#Complete'],
            \ })

And after "$this->" I can see that automatically it's being called, but there is some kind of error:

[ncm2_core@yarp] php on_complete: Vim(call):E119: Not enough arguments for function: phpactor#Complete

Still working well when called through <C-x><C-o>

from ncm2-phpactor.

dantleech avatar dantleech commented on July 22, 2024

Just out of interest, what advantage are you trying to gain here?

from ncm2-phpactor.

fcojavierdomenech avatar fcojavierdomenech commented on July 22, 2024

mmm I like your plugin and I'm aware you are actively working on it so I'd like to adapt my vim settings as much as possible to it. I saw the completions look different when triggered automatically and manually and I asked here.

from ncm2-phpactor.

fcojavierdomenech avatar fcojavierdomenech commented on July 22, 2024

With "your plugin" I mean Phpactor of course.

from ncm2-phpactor.

fcojavierdomenech avatar fcojavierdomenech commented on July 22, 2024

Yep that's expected. One is using native VIM omni-complete, the other ncm2 (both are using Phactor underneath)

Ok, got it; Both are using phpactor but they represent the list in different ways. Thanks

from ncm2-phpactor.

Related Issues (17)

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.