Skip to content

Commit

Permalink
Merge pull request #530 from typed-ember/note-library-path
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreeman authored Feb 2, 2023
2 parents 4e06085 + 17a2d88 commit ea8ba9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ See the [Glint home page] for a more detailed Getting Started guide.

[glint home page]: https://typed-ember.gitbook.io/glint

If the location where `@glint/core` is installed isn't in the root of your Code workspace, you can inform the extension on a per-workspace basis where to locate the language server in the Glint extension settings.
### Monorepos and Other Non-Workspace-Root Installations

If the location where `@glint/core` is installed isn't in the root of your Code workspace, you can inform the extension on a per-workspace basis where to locate the language server in the Glint extension settings under **Glint: Library Path**.

<img width="705" alt="Input for `glint.libaryPath` in the VS Code configuration editor." src="https://user-images.githubusercontent.com/108688/206561138-aca2bb80-04f6-44dd-a23f-032d4f163f7a.png">

For example, if your dependency on `@glint/core` were declared in `frontend/package.json` in your workspace, you could set the library path to `./frontend` in order for the extension to be able to locate it.

## Usage

Expand Down
4 changes: 3 additions & 1 deletion packages/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ function findLanguageServer(workspaceDir: string): string | null {
// just bail out if we don't see `@glint/core`. If someone IS expecting Glint to run for this
// project, though, we leave a message in our channel explaining why we didn't launch.
outputChannel.appendLine(
`Unable to resolve @glint/core from ${resolutionDir} — not launching Glint for this directory.`
`Unable to resolve @glint/core from ${resolutionDir} — not launching Glint for this directory.\n` +
`If Glint is installed in a child directory, you may wish to set the 'glint.libraryPath' option ` +
`in your workspace settings for the Glint VS Code extension.`
);

return null;
Expand Down

0 comments on commit ea8ba9e

Please sign in to comment.