Skip to content

feat: resolve Vue/Svelte/Astro/CSS paths under the cursor - #56

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/path-target-extensions-15fc
Aug 29, 2026
Merged

feat: resolve Vue/Svelte/Astro/CSS paths under the cursor#56
cursor[bot] merged 1 commit into
mainfrom
cursor/path-target-extensions-15fc

Conversation

@nicholasadamou

@nicholasadamou nicholasadamou commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

Expand resolvePathToken candidates so open-under-cursor (and related path resolution) finds .vue, .svelte, .astro, .css, .scss, .mts, and .cts when the token has no extension — matching the set a bundler would try before falling through to the language server.

Test plan

  • bun test test/core/path-target.test.ts
  • CI green
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Improved path resolution for additional file types, including Vue, Svelte, Astro, CSS, SCSS, TSX, JSX, and modern TypeScript module files.

Expand open-under-cursor candidates so extensionless import and path
tokens land on single-file components and stylesheets, not only the
JS/TS/JSON/Markdown set.

Co-authored-by: Nicholas Adamou <nicholasadamou@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a914a07d-0c66-4c57-b3b1-d762f8f9f654

📥 Commits

Reviewing files that changed from the base of the PR and between 7ef1c70 and a268482.

📒 Files selected for processing (2)
  • src/core/pathTarget.ts
  • test/core/path-target.test.ts

📝 Walkthrough

Walkthrough

The path resolver now checks additional TypeScript, JavaScript, frontend framework, and stylesheet extensions. Tests cover extensionless resolution for Vue, Svelte, Astro, CSS, SCSS, and .mts targets.

Changes

Path target extension support

Layer / File(s) Summary
Extension lists and resolution coverage
src/core/pathTarget.ts, test/core/path-target.test.ts
The extension lists add .tsx, .mts, .cts, .jsx, .vue, .svelte, .astro, .scss, and .css where applicable. Tests verify extensionless paths for the new target types.

Estimated code review effort: 1 (Trivial) | ~5 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/path-target-extensions-15fc

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.

@nicholasadamou
nicholasadamou marked this pull request as ready for review August 29, 2026 12:28
@cursor
cursor Bot merged commit e11b377 into main Aug 29, 2026
6 of 7 checks passed
@cursor
cursor Bot deleted the cursor/path-target-extensions-15fc branch August 29, 2026 12:29
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.

2 participants