vim-jsx icon indicating copy to clipboard operation
vim-jsx copied to clipboard

jsx omni completion

Open plexigras opened this issue 7 years ago • 3 comments

i'm not sure how hard it is to write a custom omnicomp function but i think it would be nice to have.

https://github.com/vim/vim/blob/master/runtime/autoload/htmlcomplete.vim

https://github.com/vim/vim/blob/master/runtime/autoload/javascriptcomplete.vim

plexigras avatar Apr 27 '18 16:04 plexigras

The language server of typescript could do that, it requires parse syntax tree, but viml could hardly do that job.

chemzqm avatar May 13 '18 14:05 chemzqm

but viml could hardly do that job.

why is that?

the html completion itself has css and javascript completion for <style> and <script> tags and this would just be the reverse so html completion inside of javascritp

https://github.com/vim/vim/blob/master/runtime/autoload/htmlcomplete.vim#L175-L192

plexigras avatar May 18 '18 11:05 plexigras

but for now just adding setlocal omnifunc=htmlcomplete#CompleteTags to ~/.vim/ftplugin/jsx.vim is good enough.

plexigras avatar May 18 '18 12:05 plexigras