PathSense
Context-aware path autocomplete for VS Code. Unlike generic path suggestions, PathSense understands what you're writing and shows only relevant files.
Features
Smart Context Filtering
PathSense detects what you're typing and filters suggestions accordingly:
| Context |
Shows Only |
<img src=" |
.png .jpg .svg .webp .gif .ico |
<script src=" |
.js .mjs .jsx .ts |
<link href=" |
.css .scss .sass .less |
<video src=" |
.mp4 .webm .ogg .mov |
<audio src=" |
.mp3 .wav .ogg .flac |
import ... from " |
.js .ts .vue .json |
@import " |
.css .scss .sass .less |
<a href=" |
All files |
Folders are always shown for navigation. Toggle this with pathSense.contextFilter.
Image Preview on Hover
Hover over any image path to see:
- Thumbnail preview
- Image dimensions (width x height)
- File size
Supports PNG, JPEG, GIF, SVG, WebP, BMP, ICO.
Path Validation
Invalid paths are highlighted with a warning underline. Fix broken references before they reach production.
- Checks
src, href, import, require, and more
- Ignores URLs, data URIs, and template expressions
- Resolves extensionless imports (tries
.ts, .tsx, .js, index.*)
Ctrl+Click Navigation
Click any path (with Ctrl/Cmd held) to jump directly to that file. Works with:
- Relative paths (
./, ../)
- Absolute paths (
/)
- Alias paths (
@/)
Path Alias Support
Automatically reads path aliases from tsconfig.json or jsconfig.json:
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
Type @/components/ and get suggestions from src/components/.
Relative / Absolute Path Conversion
Convert between relative and absolute paths:
- Keybinding:
Ctrl+Alt+/
- Code Action: Click the lightbulb on any path
./assets/logo.png <-> /assets/logo.png
No Duplicate Suggestions
PathSense automatically suppresses VS Code's built-in path suggestions. You see one clean list, not two overlapping ones.
File Size Display
Every suggestion shows the file size, so you can spot unexpectedly large assets before importing them.
Configuration
| Setting |
Default |
Description |
pathSense.contextFilter |
true |
Filter by context (img→images, script→js) |
pathSense.validatePaths |
true |
Warn on non-existent paths |
pathSense.imagePreview |
true |
Show image preview on hover |
pathSense.showFileSize |
true |
Show file size in suggestions |
pathSense.smartSort |
true |
Sort by recently modified first |
pathSense.aliasSupport |
true |
Read aliases from tsconfig/jsconfig |
pathSense.autoOmitExtension |
false |
Omit .ts/.vue/.js in imports |
pathSense.omitExtensions |
[".ts",".tsx",".js",".jsx",".vue"] |
Extensions to omit |
pathSense.excludedFolders |
["node_modules",".git","dist","build","out",".next"] |
Excluded folders |
pathSense.maxSuggestions |
30 |
Max suggestions shown |
pathSense.rootPath |
"" |
Custom root for absolute paths |
Supported Languages
HTML, JavaScript, TypeScript, JSX, TSX, Vue, PHP, CSS, SCSS, Less.
Comparison
| Feature |
PathSense |
Path Intellisense |
Path Autocomplete |
| Context-aware filtering |
Yes |
No |
No |
| Image preview on hover |
Yes |
No |
No |
| Path validation warnings |
Yes |
No |
No |
| Ctrl+Click navigation |
Yes |
No |
No |
| Relative/Absolute conversion |
Yes |
No |
No |
| No duplicate suggestions |
Yes |
No |
No |
| File size display |
Yes |
No |
No |
| Path alias (@/) |
Yes |
Partial |
Yes |
| Smart sorting (recent first) |
Yes |
No |
No |
Requirements
Release Notes
1.0.0
Initial release with full feature set:
- Context-aware path autocomplete
- Image preview on hover
- Path validation diagnostics
- Ctrl+Click file navigation
- Path alias support
- Relative/Absolute path conversion
- Smart sorting and file size display