Auto-insert import statements when autocompleting keywords for neovim
MIT License
Use this instead: https://github.com/Galooshi/import-js
jsimport is a NodeJS remote plugin for Neovim that provides autocompletion for javascript imports. Autocompletion requires deoplete.
Use a plugin manager (vim-plug, Neobundle, dein, etc). neovim/node-host
requires running npm install
.
Or manually check out the repo and put the directory to your vim runtime path.
Plug 'billyvg/node-host', { 'do': 'npm install' }
Plug 'billyvg/jsimport.nvim'
Update plugins via git or plugin manager (i.e. with vim-plug
: :PlugUpdate
). Then :UpdateRemotePlugins
and finally restart Neovim.
Tested on:
This is in a very early state, so you'll have to manually run this vim command first in order to generate the source file for deoplete (as well as some context information when finishing an autocomplete)
:JsImportCache
After the file is generated, you will be able to autocomplete keywords in js
and jsx
files. After the autocomplete finishes
it will also insert an ES6 import at the top of the file. Customization is currently limited.
let g:jsimport#reporting = 1
Turns error reporting to Sentry on. Please view source, we try not to collect any user information. This is opt-in so if you want to help improve this, please turn it on!