spacemacs/layers/+tools/import-js
syl20bnr 9606dd344e [dap] Refactor configuration dap config in layers
* use local-vars-hook coupled to setup function for dap
* define new private layer variable `spacemacs--dap-supported-modes` to
  configure key bindings. This allows to move the key bindings definition from
  `funcs.el` to `packages.el`
* remove duplication of DAP key bindings in READMEs by pointing to the dap layer
  documentation
* alphabetically sort package configuration
2019-09-30 00:34:26 -04:00
..
config.el [dap] Refactor configuration dap config in layers 2019-09-30 00:34:26 -04:00
funcs.el Move "import-js" to own layer for js based layers 2019-04-18 21:08:43 +02:00
packages.el Move "import-js" to own layer for js based layers 2019-04-18 21:08:43 +02:00
README.org documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00

import-js layer

Description

This layer adds support for import-js

Features:

  • Import Javascript/Typescript modules to buffer
  • Import missing modules and remove unused one
  • Go to module location

Install

To use this configuration layer, add it to your ~/.spacemacs.

To install import-js globally:

  $ npm install -g import-js

If that doesn't work you can also try installing import-js with --unsafe-perm tag

  $ sudo npm install --unsafe-perm -g import-js

To enable it, set the layer variable javascript-import-tool, for example for the javascript layer

  (javascript :variables javascript-import-tool 'import-js)

Once you have set this variable other layers react and typescript will also enjoy this feature

Key bindings

Key binding Description
SPC m i i Import the module for the variable under the cursor
SPC m i f Import any missing modules and remove any modules that are not used
SPC m i g Go to the module of the variable under cursor