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

Automatic Import Organisation not working #843

Closed
3 tasks done
blake-newman opened this issue Jul 18, 2018 · 9 comments · Fixed by #2635
Closed
3 tasks done

Automatic Import Organisation not working #843

blake-newman opened this issue Jul 18, 2018 · 9 comments · Fixed by #2635

Comments

@blake-newman
Copy link
Member

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform:
  • Vetur version: 0.12.1
  • VS Code version: 1.25.1

Problem

Automatic organization / cleans up of imports does not work in Vue files.

Reproducible Case

Run alt + shift + o (Linux) running in TS/JS file will automatically clean up imports and organize them.

Action

I am happy to do the work, this may not be a problem in Vetur itself, but somewhere else. However, i am not 100% sure where to look. @octref

@octref
Copy link
Member

octref commented Aug 1, 2018

This is something relatively new & just getting added to the LSP protocol.

https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction

I haven't figured out a way to implement it yet...I'll look into it.

@TimeBandit
Copy link

TimeBandit commented Jun 3, 2019

We are seeing this also; we are using [email protected]

@beeplin
Copy link

beeplin commented Jul 3, 2019

Any update on this? Really enjoy auto organization of imports in JS but it is frustrating not being able to use it in VUE files.

@yoyo930021
Copy link
Member

Fixed in #2635

@Karolis92
Copy link

was this released? It still does not work for me with v0.34.1

@Glandos
Copy link

Glandos commented Jun 28, 2021

GitHub says it was included in 0.32.0, but it is only working with Organize Imports manual command, and not with:

"editor.codeActionsOnSave": {
      "source.organizeImports": true
  }

@yoyo930021
Copy link
Member

GitHub says it was included in 0.32.0, but it is only working with Organize Imports manual command, and not with:

"editor.codeActionsOnSave": {
      "source.organizeImports": true
  }

Follow #3018

@Karolis92
Copy link

Karolis92 commented Jun 28, 2021

for me it doesn't work with shortcut either...
Edit.
Or with manual command. All imports are moved to top, above template tag, and it breaks everything

@triforcely
Copy link
Contributor

@Karolis92 this issue is pretty old but there is a fresh one that describes what you are experiencing #3020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants