kakoune plugin to work with npm and yarn, the JavaScript package managers.
Add npm.kak
to your autoload dir: ~/.config/kak/autoload/
.
Or via plug.kak:
plug 'delapouite/kakoune-npm'
To use the npm-info
command, you need to have curl and jq on your system.
It provides the following commands:
npm-info
: show dependency info on package.json current linenpm-update-latest
: update to package@latest on current line (bump major)yarn-upgrade-latest
: upgrade to package@latest on current line (bump major)npm-edit-package-json
: open the nearest package.json
It also offers basic autocompletion in insert mode. While typing something like:
const React = require('re[]
or
import React from 're[]
This plugin extracts all dependencies listed in the package.json
of the current project.
This list is merged with the node core modules list like fs
, path
, http
โฆ
Everytime it detects require('
, or import foo from '
it will attempt to match the following word
against this dependencies list.
- kakoune-ecmascript
- kakoune-typescript
- kakoune-flow - Flow type-checking and coverage
- kakoune-grasp - Text objects based on AST
- kakoune-goto-file - Enhanced
gf
fornode_modules
MIT