README.md

July 6, 2025 · View on GitHub

NPM Workspaces Language Server

Logo

Works with npm, yarn, bun & pnpm workspaces.

Features

  • Autocompletion for dependencies from the public npm registry and from pnpm/Bun catalogs, usable inside a workspace's package.json.
  • Autocompletion for local dependencies between workspace packages.
  • Warnings for missing or not installed packages within a workspace.
  • Jump-to-definition support: quickly navigate to a dependency’s package.json—either from node_modules or another workspace package.

Installation

VSCode

Install npm workspaces lsp client

nvim

  • Download from npm
 npm i -g npm-workspaces-language-server
  • Add to lsp/npmls
--- @type vim.lsp.Config
return {
  cmd = { "npx", "npm-workspaces-language-server", "--stdio" },
  filetypes = { "json", "packagejson" },
  root_markers = { ".git", "package.json" },
}
  • Enable lsp

vim.lsp.enable({
  "npmls",
})