atom-community / atom-community/autocomplete-paths
When editing a .js file, a paths to .vue files are not autocompleted (missing from default-scopes.js)
- Dominant language
- JavaScript
- Stars
- 152
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
### Prerequisites
* [X] Put an X between the brackets on this line if you have done all of the following:
* Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
* Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
* Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
* Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
* Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
### Description
When working on Vue applications, sometimes you need to import `.vue` files inside of normal `.js` files, for example, when configuring Vue-Router [docs](https://router.vuejs.org/guide/#javascript).
I was looking at #128 and the PR that addressed it #142, and noticed that it resolves paths to .vue files inside of other .vue files (via the vue scope), but doesn't add similar configuration to .js files (e.g. to handle the use case above).
### Steps to Reproduce
1. Inside of a Vue project, try to `import` a .vue file inside of a .js file.
1. Get only .js autocomplete suggestions
**Expected behavior:** [What you expect to happen]
1. Inside of a Vue project, try to `import` a .vue file inside of a .js file.
1. Get only .vue autocomplete suggestions if there are any
**Actual behavior:** [What actually happens]
1. Inside of a Vue project, try to `import` a .vue file inside of a .js file.
1. Get only .js autocomplete suggestions
**Reproduces how often:** [What percentage of the time does it reproduce?]
Always
### Versions
You can get this information from copy and pasting the output of `atom --version` and `apm --version` from the command line. Also, please include the OS and what version of the OS you're running.
### Additional Information
On my local copy of default-scopes.js, I added `vue` to the `extensions` array for the first JS scope entry and it seems to work. I can submit a PR with the same patch.
Contributor guide
Research direction
Read default-scopes.js and compare the JavaScript scope with the Vue scope described in the issue. Reproduce the import case in a Vue project, then verify that path completion from a JavaScript file includes .vue files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100