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

点一个标签会高亮所有同名标签,能否只高亮对应的闭合标签? #72

Closed
xinple opened this issue May 27, 2018 · 14 comments
Labels
enhancement New feature or request

Comments

@xinple
Copy link

xinple commented May 27, 2018

image

比如上图,单击了最后一个 </view> 就把文档里面所有的 view 全部高亮了。

下图是不用插件的时候(不用插件的时候,要双击才会全部高亮):

image

看看能否修改一下只高亮对应的标签?感谢

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

你好,这个功能不是我的插件做的。

是不是有其它插件?

@xinple
Copy link
Author

xinple commented May 27, 2018

如果 disable 掉 minapp 插件就不会这样,我再排查一下,看看是不是哪里设置有冲突。

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

你用 html 文件试试(因为 minapp 完全不会处理 html 文件),我这边结果都是你上面的图片

如果你找到原因了,可以分享下,我也很想知道你下面的图片效果是怎么做到的,那样体验好多了。

@xinple
Copy link
Author

xinple commented May 27, 2018

😄 那就对了。可能是我没描述清楚

第一个图片那种情况是安装 minapp 之后才出现的。

下面的图片效果在 disable 掉 minapp 之后就有了,应该就是 VSCode 自带的效果。

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

我完全没处理过这个,看下面这个 issue 好像这个功能本身实灵实不灵的

microsoft/vscode#2915

@xinple
Copy link
Author

xinple commented May 27, 2018

.html 文件正常,是图2的效果,然后如果我如下设置:
"files.associations": { "*.wxss": "css", "*.wxml": "html" },

也会如图2一般,但 minapp 就失效了

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

发现了,vscode 默认会高亮所有名称相同的选中项,要实现匹配的标签得单独写代码实现 😅

@qiu8310 qiu8310 added the enhancement New feature or request label May 27, 2018
@xinple
Copy link
Author

xinple commented May 27, 2018

不对啊,我和你相反,啥插件都不装,配置都使用默认配置的情况下,默认只高亮对应闭合的标签,不会高亮所有相同标签 😅

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

因为你把它关联到 html 了,html 官方处理过了

@xinple
Copy link
Author

xinple commented May 27, 2018

原来如此,那如果让 minapp 支持 .html 格式呢?这样的话 "files.associations": { "*.wxml": "html" },之后还可以支持 .html 的一些功能。现在用 minapp 的时候,就不能用这个配置。

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

一个文件只能有一种文件类型呢

@xinple
Copy link
Author

xinple commented May 27, 2018

那就把 html 的处理方式搬过来 😆

@qiu8310
Copy link
Owner

qiu8310 commented May 27, 2018

嗯,下个版本研究一下

@qiu8310
Copy link
Owner

qiu8310 commented May 30, 2018

修复了这个问题,暂时还没发布

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

No branches or pull requests

2 participants