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

vetur 1.0 #188

Closed
11 of 12 tasks
octref opened this issue May 8, 2017 · 33 comments
Closed
11 of 12 tasks

vetur 1.0 #188

octref opened this issue May 8, 2017 · 33 comments
Labels
Milestone

Comments

@octref
Copy link
Member

octref commented May 8, 2017

It's time to look at 1.0 for vetur.
Planning to ship mid June before VueConf.
I don't think all these features can be implemented before VueConf, and I'm giving higher prioritization to fix existing issues, especially with Vue language server's crash which can be annoying.
1.0 is probably gonna happen sometime later during summer.

Grand Picture

Important Features


This is a live document that would be constantly updated.

Leave feedback on what you'd like to see on 1.0.

@octref octref added the plan label May 8, 2017
@octref octref added this to the 1.0 milestone May 8, 2017
@frankdugan3
Copy link

I don't know if this should be 1.0 or in subsequent, but one feature I would really like to see is prettier as the JS formatter.

Perhaps what would make sense to keep configuration simple is that rather than exposing options for the formatting, the user would specify which formatter (js-beautify, xo, prettier, etc.), and Vetur would simply use the existing settings (user/workspace) for that formatter. I would think in most use cases, the user would want the same JS rules for .vue files as with their .js files.

@octref
Copy link
Member Author

octref commented May 10, 2017

@frankdugan3
First, current JS formatting is handled by TypeScript, not js-beautify.
That being said I've been thinking about integrating prettier, but one concern is Vue supports JSX now and I'm not sure if it would work well with prettier (it should since React also uses JSX).

The first step is making linter / formatter for <style> selectable, as in #190.

@Baoyx007
Copy link

looking forward to Support for Stylus intelliSense

@chanlito
Copy link

chanlito commented Jun 8, 2017

@frankdugan3 yeah, prettier would be a nice addition.

@octref
Copy link
Member Author

octref commented Jun 19, 2017

@Baoyx007 stylus support is added with #227 thanks to @HerringtonDarkholme!

@lobosan
Copy link

lobosan commented Sep 21, 2017

Hi, thanks for this wonderful extension. Could you please consider adding IntelliSense for Vuetify?

I think this framework is pretty awesome and has such a great community. I'm sure that if you get in touch with @johnleider and @nekosaur they will be more than happy to collaborate with you.

All the best

@johnleider
Copy link

It's already an issue lobosan. #380

@lobosan
Copy link

lobosan commented Sep 21, 2017

Oh excellent @johnleider and sorry I didn't mean to duplicate an issue hehe..

@qm3ster
Copy link

qm3ster commented Oct 15, 2017

I am sure everyone whom it may concern and their grandmother already knows, but:
Prettier supports JSX now.

@transtone
Copy link

transtone commented Nov 9, 2017

#488
please get this bug done.

=================
fixed in vetur-0.11.3

@octref
Copy link
Member Author

octref commented Nov 9, 2017

@transtone I don't fix js-beautify bugs.

@transtone
Copy link

@octref It's not a js-beautify bug, It's vetur's bug.
vscode's html(use js-beautify too) do not have this bug.
are you guys never use multi line comment in template?

@HerringtonDarkholme
Copy link
Member

@transtone Vetur has quite a lot template preprocessing. I don't think the bug can be easily fixed, or it might be inherently caused by incompatibility between js-beautify and vetur.

If you want get feature done, please send us a pull request.

@transtone
Copy link

transtone commented Nov 13, 2017

@HerringtonDarkholme I'll have a try.

=============
Thanks for fixed it in vetur-0.11.3.
but comment in <style> still have the reindent bug.

@kuechlerm
Copy link

Love this extension so far (0.11.5), but #355 seems to be a critical blocker. Any changes in the imports are not automatically reflected in .vue files.

@satanworker
Copy link

Hey, guys, is there jump to definition working?

@Airkro
Copy link

Airkro commented Feb 13, 2018

stylelint will be great.

@M6stafa
Copy link

M6stafa commented Mar 11, 2018

when this version planed to release?

@MrSunshyne
Copy link

Jump to definition for class/id doesn't seem to be working in SFCs. Is it just me ?

@mobilehobo
Copy link

Being able to edit scaffolds would be amazing

@eladcandroid
Copy link

@octref Can you please update us about the important new features?

@serak
Copy link

serak commented Apr 20, 2018

when is this plugin able to reformat HTML inside .vue file?

@MrSunshyne
Copy link

@serak , it can already do that. Also took me weeks before figuring that out by scavenging github issues. Here you go : by Nemesarial

@octref
Copy link
Member Author

octref commented May 15, 2018

@MrSunshyne Or you can find it easily in the documentation...https://vuejs.github.io/vetur/formatting.html

@ZSkycat
Copy link

ZSkycat commented Aug 3, 2018

I think vetur should make the enhanced html development experience a top priority.
For example, extracting typescript language service type information is used in html attributes.

Style can use an external file, or use @import to implement scoped style
Script can use a separate .ts or .js file and then use import

Especially for ts, using a separate .ts for a better development experience and the ability to follow the officially available features of typescript

  • rename
  • updateImportsOnFileMove
  • #region collapse code

I have now decided to change the script code in all .vue files to a separate file.
advantage:

  • Get complete refactoring
  • The .vue file does not have too many lines of code

After splitting the vue single file, we can get a lot of features support for editors and extensions.

I hope that vue officials can seriously consider this issue.


example:

tim 20180803111222
tim 20180803111235

great extension but not support Vue:
https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero


我认为 vetur 应该把增强 html 开发体验作为首要任务。
比如提取 typescript 语言服务类型信息用在 html 属性上等。

style 可以使用外部文件,或者使用 @import 实现 scoped style
script 可以使用独立的 .ts 或 .js 文件,再通过 import 使用

特别是对于 ts 来说,使用独立的 .ts 可以获得更好的开发体验,并且可以及时跟随 typescript 官方提供的功能

  • 重命名
  • 自动修正 import 路径
  • #region 折叠代码

目前我已经决定将所有 .vue 文件中的 script 代码改成单独文件
优点:

  • 获得完善的重构功能
  • .vue 文件的代码行数不会太多

将 vue 单文件拆分后,我们可以获得编辑器和扩展的许多功能支持

希望 vue 官方人员可以认真考虑一下这个问题。
@yyx990803

@chanlito
Copy link

chanlito commented Aug 3, 2018

@ZSkycat I think, you're describing Angular. I use Vue because of the SFC.

@ZSkycat
Copy link

ZSkycat commented Aug 3, 2018

@chanlito vue.js is the progressive framework. Not the SFC framework

@yyx990803
Copy link
Member

@ZSkycat you never know you can do this?

<script lang="ts" src="./foo.ts"></script>
<style src="./foo.css"></style>

@ZSkycat
Copy link

ZSkycat commented Aug 3, 2018

@yyx990803 Sorry, I really don't know. Thanks for telling me.

I just found these
https://cn.vuejs.org/v2/guide/single-file-components.html#%E6%80%8E%E4%B9%88%E7%9C%8B%E5%BE%85%E5%85%B3%E6%B3%A8%E7%82%B9%E5%88%86%E7%A6%BB%EF%BC%9F
https://vue-loader.vuejs.org/spec.html#intro


尤大,我想大多数使用者也并不知道 .vue 可以这么使用的,而认为是 SFC.
目前的情况是,在 .vue 中编写 ts 和在 .ts 中编写 ts,开发体验的差距已经很大了
是否应该在 vue 官方文档 中的 typescript 支持中提及使用这种方法来提升开发体验?

@octref
Copy link
Member Author

octref commented Aug 4, 2018

Especially for ts, using a separate .ts for a better development experience and the ability to follow the officially available features of typescript
rename
updateImportsOnFileMove
#region collapse code

The last two features come relatively new to LSP and I have not adopted it yet.
For F2 to rename — I'll look into it.

@octref octref mentioned this issue Aug 13, 2018
17 tasks
@octref
Copy link
Member Author

octref commented Aug 13, 2018

New roadmap at #873.

@gitpushdev
Copy link

gitpushdev commented Aug 27, 2018

@yyx990803 I do it the other way around as in <template src="">
and keep script and style in the .vue file. Is it wrong?
I only do that for the support I get from VS Code for my HTML code when having it in a separate file

@octref
Copy link
Member Author

octref commented Aug 27, 2018

@gitpushdev Please don't ping Evan for every question you have. There is a Discord channel for these questions.
What you are doing is not wrong.

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

No branches or pull requests