No description
Find a file
2023-01-03 14:17:57 -06:00
doc update readme 2023-01-03 14:17:23 -06:00
lua feat: improved diff 2023-01-02 20:56:31 -06:00
.gitignore initial commit 2022-12-31 14:08:30 -06:00
.stylua.toml initial commit 2022-12-31 14:08:30 -06:00
index.js move index script 2023-01-01 20:16:37 -06:00
install.sh update install script 2023-01-03 14:17:57 -06:00
readme.md update readme 2023-01-03 14:17:23 -06:00

import-cost.nvim

Display the costs of javascript imports inside neovim with the power of import-cost.

preview

Installation

  1. Install regularly with your neovim package manager
  2. Run install.sh with your node.js package manager to setup import-cost:
sh install.sh '<your-package-manager>'

For example, a config with yarn and lazy.nvim may look like the following:

require('lazy').setup {
    {
        'barrett-ruth/import-cost.nvim',
        build = 'sh install.sh yarn'
    }
}

Configuration

Configure via the setup function (or use the defaults with no arguments):

require('import-cost').setup(opts)

See :h import-cost for more information

TODO

  1. CommonJS support

Acknowledgements

  1. wix/import-cost: provides the node backend that calculates the import costs
  2. import-cost: the original VSCode plugin that started it all
  3. vim-import-cost: inspired me to do it in neovim!