Skip to content

feat: migrate hover to language-service#89

Open
9romise wants to merge 9 commits intomainfrom
hover
Open

feat: migrate hover to language-service#89
9romise wants to merge 9 commits intomainfrom
hover

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Mar 25, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

This PR moves hover handling from the VS Code extension into the language server: it removes the extension-side hover provider and its tests, adds a hover plugin in the language-service package, updates the language-server and workspace APIs (nearest-package-manifest lookup and dependency-resolution-by-containing-package), adjusts language-core import/offset utilities, and changes the VS Code client to wrap hover results into MarkdownString with HTML enabled. It also wires the Volar language server into extension activation and enables copying server build artifacts into the extension distribution.

Possibly related PRs

  • npmx-dev/vscode-npmx PR 83: Modifies the same VS Code hover files and hover resolution logic that this change removes or migrates.
  • npmx-dev/vscode-npmx PR 86: Adds/extends WorkspaceContext APIs for nearest-package-manifest resolution used by the new server-side hover resolution.
  • npmx-dev/vscode-npmx PR 87: Updates language-server/language-service integration and client middleware for hover handling that this PR further extends.
🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request has no description provided by the author. Add a pull request description explaining the changes, migration approach, and testing performed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hover

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e91adfcb-6835-4e44-80bb-b892707e71dd

📥 Commits

Reviewing files that changed from the base of the PR and between fda0c92 and 12187a4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • extensions/vscode/src/client.ts
  • extensions/vscode/src/index.ts
  • extensions/vscode/src/providers/hover/index.ts
  • extensions/vscode/src/providers/hover/npmx.ts
  • extensions/vscode/src/providers/hover/resolve.test.ts
  • extensions/vscode/src/providers/hover/resolve.ts
  • extensions/vscode/tsdown.config.ts
  • packages/language-core/src/utils/source-import.test.ts
  • packages/language-core/src/utils/source-import.ts
  • packages/language-core/src/workspace.ts
  • packages/language-server/src/workspace.ts
  • packages/language-service/package.json
  • packages/language-service/src/index.ts
  • packages/language-service/src/plugins/hover.ts
  • packages/language-service/src/types.ts
  • packages/language-service/src/utils/range.ts
  • playground/index.ts
💤 Files with no reviewable changes (4)
  • extensions/vscode/src/providers/hover/index.ts
  • extensions/vscode/src/providers/hover/npmx.ts
  • extensions/vscode/src/providers/hover/resolve.test.ts
  • extensions/vscode/src/providers/hover/resolve.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 51ce2289-f206-4f2d-9823-918584c0a0ed

📥 Commits

Reviewing files that changed from the base of the PR and between 12187a4 and 5efbc3a.

📒 Files selected for processing (2)
  • packages/language-core/src/utils/source-import.test.ts
  • packages/language-core/src/utils/source-import.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/language-core/src/utils/source-import.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 32665f15-3e69-4b44-a68f-c547f27c1935

📥 Commits

Reviewing files that changed from the base of the PR and between 5efbc3a and cd461b1.

📒 Files selected for processing (3)
  • extensions/vscode/src/client.ts
  • packages/language-core/src/utils/source-import.test.ts
  • packages/language-core/src/utils/source-import.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/language-core/src/utils/source-import.test.ts
  • extensions/vscode/src/client.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant