Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete fails for image asset imports in JavaScript files #18173

Open
1 task done
Moshyfawn opened this issue Sep 21, 2024 · 0 comments
Open
1 task done

Autocomplete fails for image asset imports in JavaScript files #18173

Moshyfawn opened this issue Sep 21, 2024 · 0 comments
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc inline completion Umbrella label for Copilot, Supermaven, etc. completions javascript JavaScript programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors

Comments

@Moshyfawn
Copy link
Member

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Zed struggles to correctly resolve or autocomplete paths when importing image assets (e.g., .png) in JavaScript files.

Steps to reproduce

  1. Create a new JS project: npm create vite@latest test-js-assets-import -- --template vanilla
  2. Open the project in Zed
  3. Create an assets directory in the project root and add an image file (e.g., save the following screenshot in the assets directory):
JS asset import fail example
  1. In main.js, type import './assets/' and attempt to autocomplete the image file path (e.g. Command Palette > editor: show completions):
  2. Observe that Zed fails to show the image file path in the autocomplete list

Environment

Zed: v0.155.0 (Zed Nightly f8195c4)
OS: macOS 14.6.1
Memory: 18 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@Moshyfawn Moshyfawn added bug [core label] triage Maintainer needs to classify the issue editor Feedback for code editing, formatting, editor iterations, etc javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors language server failure Language server doesn't work as expected admin read Pending admin review language server An umbrella label for all language servers inline completion Umbrella label for Copilot, Supermaven, etc. completions and removed triage Maintainer needs to classify the issue labels Sep 21, 2024
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Sep 23, 2024
@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc inline completion Umbrella label for Copilot, Supermaven, etc. completions javascript JavaScript programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

No branches or pull requests

3 participants