mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsx omni completion

plexigras opened this issue · 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

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

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

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