npm-workspaces-lsp
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

npm i -g npm-workspaces-lsp

I use it in Neovim to get autocompletion for local npm workspaces in dependencies and devDependencies

-- Npm workspaces lsp
local c = vim.lsp.start_client({
  config = {
    cmd = { "npx", "npm-workspaces-lsp", "--stdio" },
  },
  name = "npm-workspaces-lsp",
  cmd = { "npx", "npm-workspaces-lsp", "--stdio" },
  root_dir = vim.loop.cwd(),
})

vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
  pattern = { "package.json" },
  callback = function()
    vim.lsp.buf_attach_client(0, c)
  end,
})
--

Readme

Keywords

none

Package Sidebar

Install

npm i npm-workspaces-lsp

Weekly Downloads

3

Version

0.0.4

License

MIT

Unpacked Size

7.62 kB

Total Files

9

Last publish

Collaborators

  • akisarou