Home Explore Blog CI



zed

docs/src/languages/yarn.md
df7685cfd64465c4f408d4b8bf9c49a95e25df087819f4e5000000030000037e
# Yarn

[Yarn](https://yarnpkg.com/) is a versatile package manager that improves dependency management and workflow efficiency for JavaScript and other languages. It ensures a deterministic dependency tree, offers offline support, and enhances security for reliable builds.

## Setup

1. Run `yarn dlx @yarnpkg/sdks base` to generate a `.yarn/sdks` directory.
2. Set your language server (e.g. VTSLS) to use Typescript SDK from `.yarn/sdks/typescript/lib` directory in [LSP initialization options](../configuring-zed.md#lsp). The actual setting for that depends on language server; for example, for VTSLS you should set [`typescript.tsdk`](https://github.com/yioneko/vtsls/blob/6adfb5d3889ad4b82c5e238446b27ae3ee1e3767/packages/service/configuration.schema.json#L5).
3. Voilla! Language server functionalities such as Go to Definition, Code Completions and On Hover documentation should work.

Chunks
a2e387b5 (1st chunk of `docs/src/languages/yarn.md`)
Title: Yarn Package Manager Setup for Zed Editor
Summary
This section explains how to set up the Yarn package manager with the Zed editor to enable language server functionalities like Go to Definition, Code Completions, and On Hover documentation. The process involves generating a `.yarn/sdks` directory, configuring the language server (e.g., VTSLS) to use the Typescript SDK from the `.yarn/sdks/typescript/lib` directory, and then verifying that the language server features are working.