npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chemzqm/neovim

v6.3.6

Published

NodeJS client API for vim9 and neovim

Readme

neovim-client

Fork of neovim/node-client which works on both vim9 and neovim.

Currently works on node >= 8.

This module is used by coc.nvim, you can use this module to create extension for vim9 and neovim, but it's recommended to build extension for coc.nvim.

Build from source code

Git clone then run npm install.

API

import {attach, NeovimClient} from '@chemzqm/neovim'
// attach option could be ReadableStream & WritableStream or ChildProcess or socket string
const nvim: NeovimClient = attach({
  reader: process.stdin,
  writer: process.stdout
})
// current buffer object
let buf = await nvim.buffer
// current window object
let win = await nvim.window
// current tabpage object
let tabpage = await nvim.tabpage

Debug on vim9

Build this module from source code, in root of project folder, start the server by command: vim -u mini.vim.

Checkout the vim9's log file by :Openlog command.

Checkout log of node-client by open the file $XDG_RUNTIME_DIR/node-client.log.

To change the behavior, change the file mini.vim and ./bin/server.js which are used for test purpose.

Debugging / troubleshooting

Default location for log file would be $XDG_RUNTIME_DIR/node-client.log.

Use $NODE_CLIENT_LOG_FILE to specify full path of the log.

Use $NODE_CLIENT_LOG_LEVEL to specify the log level, which default to info, could also be debug or trace.

Use let g:node_client_debug = 1 in vim9 to enable logfile of vim9, use :call nvim#rpc#open_log() to open vim9 logfile.

Usage through node REPL

The feature need build this module from source code.

Connect to neovim

First, start Nvim with a known address (or use the $NVIM_LISTEN_ADDRESS of a running instance):

NVIM_LISTEN_ADDRESS=/tmp/nvim nvim

In another terminal, cd to root of this module then start node REPL by:

NVIM_LISTEN_ADDRESS=/tmp/nvim node

connect to Nvim:

let nvim
// `scripts/nvim` will detect if `NVIM_LISTEN_ADDRESS` is set and use that unix socket
const nvim = require('./scripts/nvim')

vim.command('vsp')

Connect to vim9

First start node repl by NVIM_REMOTE_ADDRESS=/tmp/client-vim.sock node command.

Start remote server by javascript:

const nvim = await require('./scripts/vim')

the command to start vim will be printed to stdout.

In other terminal and inside this project folder, run command:

NVIM_REMOTE_ADDRESS=/tmp/client-vim.sock vim -c 'source start.vim'

start.vim add the project directory to vim's runtimepath and connect to the server.

Not work on windows yet.

LICENSE

MIT