Coder Social home page Coder Social logo

wxml格式化 about minapp-vscode HOT 6 CLOSED

wx-minapp avatar wx-minapp commented on July 17, 2024
wxml格式化

from minapp-vscode.

Comments (6)

qiu8310 avatar qiu8310 commented on July 17, 2024

谢谢反馈,格式化是 minapp 插件内部做的,不是 vscode 的功能。

你说的那个忽略text标签格式化问题,其实配置早就写了,好像一直忘记暴露出来,刚加上了。

更新到 1.7.2,配置 minapp-vscode.reserveTags = ["text"] 即可!

from minapp-vscode.

zhanxiaoge avatar zhanxiaoge commented on July 17, 2024

<view class="desc">请输入你当前绑定的手机号码<text>138******00</text></view>

我是希望这种也能不被格式化掉。

from minapp-vscode.

qiu8310 avatar qiu8310 commented on July 17, 2024

这个也不太好实现,另外即使格式化也不影响布局吧,text标签格式化后可能影响布局

from minapp-vscode.

anran758 avatar anran758 commented on July 17, 2024

有时候为了简洁,喜欢额外空一行。这样读代码的时候不会因为太紧凑而一眼找不到想看到的部分。这个能暴露出不格式化的配置吗?

from minapp-vscode.

qiu8310 avatar qiu8310 commented on July 17, 2024

@anran758 没有实现你说的功能,哪些空行应该保留,哪些空行应该删除好难决断

from minapp-vscode.

CaTmmao avatar CaTmmao commented on July 17, 2024

@anran758 没有实现你说的功能,哪些空行应该保留,哪些空行应该删除好难决断

我今天也遇到这个问题。。可以参考下这个项目的解决方式,感觉还是挺好的。
不过没事,我先用其他格式化插件凑合了

"max_preserve_newlines": 1, // 最多可以保留几个空行
"preserve_newlines": true, // 是否允许保留空行

from minapp-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.