Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

| IDE | Installation |
|------|--------------|
| VS Code / Cursor | [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=blazejkustra.react-compiler-marker) \| [Open VSX](https://open-vsx.org/extension/blazejkustra/react-compiler-marker) |
| VS Code / Cursor / Antigravity | [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=blazejkustra.react-compiler-marker) \| [Open VSX](https://open-vsx.org/extension/blazejkustra/react-compiler-marker) |
| WebStorm / IntelliJ IDEA | [IntelliJ marketplace](https://plugins.jetbrains.com/plugin/29540-react-compiler-marker) |
| Neovim | [Setup instructions](packages/nvim-client/README.md) |
| Zed (alpha) | [Setup instructions](packages/zed-client/README.md) |
Expand Down Expand Up @@ -68,7 +68,7 @@ npx react-compiler-marker --format json . > report.json

See the [CLI README](packages/cli/README.md) for all options.

### VS Code / Cursor
### VS Code / Cursor / Antigravity

1. Install from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=blazejkustra.react-compiler-marker) or search "React Compiler Marker" in Extensions
3. Open a React component file - markers appear automatically
Expand Down
9 changes: 6 additions & 3 deletions packages/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "vscode-languageserver/node";

import { TextDocument } from "vscode-languageserver-textdocument";
import { fileURLToPath } from "node:url";
import {
checkReactCompiler,
getCompiledOutput,
Expand Down Expand Up @@ -78,9 +79,11 @@ function logError(error: string): void {
}

connection.onInitialize((params: InitializeParams): InitializeResult => {
workspaceFolder = params.workspaceFolders?.[0]?.uri;
if (workspaceFolder?.startsWith("file://")) {
workspaceFolder = workspaceFolder.slice(7);
const workspaceFolderUri = params.workspaceFolders?.[0]?.uri;
if (workspaceFolderUri?.startsWith("file://")) {
workspaceFolder = fileURLToPath(workspaceFolderUri);
} else {
workspaceFolder = workspaceFolderUri;
}

// Store client name for feature detection
Expand Down
Loading