Code Monkey home page Code Monkey logo

Comments (7)

tenfyzhong avatar tenfyzhong commented on July 1, 2024 2

In this case, I don't think it's a good idea to insert {compressible, extensions, register, source, type}. I will insert options now.
I will try to insert {compressible, extensions, register, source, type} when I fix #12

from completeparameter.vim.

danihodovic avatar danihodovic commented on July 1, 2024

@tenfyzhong master seems broken. The lastest version I can get working with JS is 28f232b. After that inserting a parenthesis simply doesn't trigger the insertion of arguments.

from completeparameter.vim.

tenfyzhong avatar tenfyzhong commented on July 1, 2024

@danihodovic I have remove default mappings. You should add this to your vimrc

inoremap <silent><expr> ( complete_parameter#pre_complete("()")
smap <c-j> <Plug>(complete_parameter#goto_next_parameter)
imap <c-j> <Plug>(complete_parameter#goto_next_parameter)

see: https://github.com/tenfyzhong/CompleteParameter.vim/blob/master/CHANGELOG#L1

from completeparameter.vim.

danihodovic avatar danihodovic commented on July 1, 2024

I tried the following settings:

Plug 'tenfyzhong/CompleteParameter.vim'
call plug#end()

inoremap <silent><expr> ( complete_parameter#pre_complete("()")

It crashes:
https://asciinema.org/a/93tf6EgVOa9tc9rEjR9jaDS92

The end bracket in the magic regex grouping is missing:
https://github.com/tenfyzhong/CompleteParameter.vim/blob/master/cm_parser/javascript.vim#L18

let param = substitute(param, '\m\(\w\+)\s*:{[^{}]*}', '\1', 'g')

should be

let param = substitute(param, '\m\(\w\+\)\s*:{[^{}]*}', '\1', 'g')

even when this is fixed the code gets stuck in a endless loop at https://github.com/tenfyzhong/CompleteParameter.vim/blob/master/cm_parser/javascript.vim#L17-L19

from completeparameter.vim.

tenfyzhong avatar tenfyzhong commented on July 1, 2024

@danihodovic can you send a pr?

from completeparameter.vim.

danihodovic avatar danihodovic commented on July 1, 2024

I can solve the initial regex typo, but fixing the endless while loop may take more time. I'll have a look once I get off work.

from completeparameter.vim.

danihodovic avatar danihodovic commented on July 1, 2024

Fixed in 930fc5a

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