-
Notifications
You must be signed in to change notification settings - Fork 202
Intellisense in .vue files? #1138
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
Comments
Have you gotten any progress in getting intellisense working? |
I've looked into it @Maxobat but haven't (and likely won't) make progress any time soon. |
I would love to see that feature too. |
FYI, I'm using VSCode nowadays still no autocomplete in vue files, but it's nice overall. Atom got too slow for me after a while. |
@snaptopixel Did you try out the atom-typescript-beta package? It's a lot faster than before. |
When you're working on a vue file and have In the debugger, I found that when sending the
BTW, in VSCode with the vetur package, you do get type errors and intellisense when working inside of .vue files, so they must have found a way around this. |
So, it's actually enabled in source.ts.embedded.html scope, there's just a bug at the moment? |
Vue now have official support for Typescript since a few months (Vue 2.5) and the most used Typescript package for Atom doesn't have support for ts inside |
The vetur package for VS Code supports it @TotomInc |
But we are talking about an Atom package here, I don't want to switch to VS Code only for this feature. I mean, if I wanted to use VS Code instead of Atom, I would not be here and look for this issue. There must be a way to implement TS autocomplete on .vue files. |
I wonder why the discussion about supporting vue files is even here in the first place. Try looking at vue-specific packages maybe? https://github.com/rwatts3/atom-ide-vue for instance. |
Maybe I'm still here because |
TypeScript package though. Nobody ever said anything about third-party library support. I don't use vue, and I'm the last active maintainer left on this project. PRs are welcome. If it turns into a lot of vue-specific code I would kindly request to make it into a separate package, because I won't be able to maintain that. If that hypothetical package needs to interface with atom-typescript, I will be happy to discuss that. |
I would really like to contribute but I have 0 experience with Atom packages and making an Intellisense package communicate with a Vue Language Server seems kinda hard as an introduction to Atom packages. 😄 |
https://github.com/atom/atom-languageclient is the place to start when considering language server integration. https://github.com/rwatts3/atom-ide-vue does exactly that by the way, but it's somewhat outdated, so probably needs a few updates. |
hey guys, I managed to get intellisense working in vue files, by hacking atom-typescript a little bit. The idea is to remove all the non-ts-related code, leaving code in script tag in place, before the content was send to the tsserver. But sad news is that even if typescript in working on vue files, tslint still not working ,which it important too(at least for me). |
A better approach could be writing a tsserver plug-in instead of hacking the client. |
Can't this plug-in be made like atom-ide-vue? If so, why not contributing on the repo? |
I modify the package and get it working on vue files by hacking it, it's on https://github.com/noe132/atom-typescript/tree/vue-hacking now. To get and test it by clone the @lierdakil I read some docs about implementing a tsserver plugin, it looks like there's no way to modify the file content before tsserver parse it by a tsserver plugin. Maybe a plugin package for atom-typescript would be good to do it. Changes made to atom-typescript are
if those functions are plug-in-able it'd be able to write a plugin package for atom-typescript. |
Btw, another concern is that I found that we can using But what I founds in vscode extension vetur, it looks like it ignore the And I've heard that eslint-plugin-vue maintain a code position map between original vue files and extracted javascript code while sending the extracting the js and send it to eslint lint core. It looks like not a simple task to implement a similar one like eslint-plugin-vue on extracting the ts code out of the vue file, and fix something like default indentation. It means I have to modify other functions like remap the error to the actual position in the original files before atom-typescript sending lint result to linter and display it.😝 Anyway, It's just another thought about the vue files extracting and linting part, and trying find a best way to get it working on vue files |
It works very well on my Vue + Typescript project. 👍 I think I'm going to switch to your branch on my Atom until this is merged. |
I'm pretty sure Angular does it somehow. Maybe I'm wrong though. |
Side note: if it's really impossible to plug via tsserver, I can figure out some sort of a plug-in system for atom-typescript, but that will take a bit. I would really prefer a more generic solution though so that potentially more people could benefit from it without gluing that to atom-typescript in particular |
@lierdakil I'll try digging further into it and go check how angular implement this and to see what can be done with it |
Any update on this? @noe132 have you stopped working on this? |
For anyone coming across this later as I have, the atom-ide-ui, paired with ide-vue and ide-typescript will allow this. I'd suggest checking it out if you still can't get this working. |
@sploders101 I can confirm that in your proposed solution intellisense working, but linting not |
@sploders101 @jtumano I can't get Intellisense or Linting to work with those packages. Have you done anything else to achieve this? |
This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days |
Recent additions in TypeStrong/ts-loader#270 have made working with .vue files are reality, however the lack of intellisense between
<script lang="ts">
tags severely limits usefulness.I've added basic support here: hedefalk/atom-vue#43, but I'm not sure how to get intellisense working (haven't done any Atom dev personally)
The text was updated successfully, but these errors were encountered: