Giter VIP home page Giter VIP logo

Comments (7)

Frederisk avatar Frederisk commented on June 18, 2024

The extension will only tell VSCode what type of text is, not the color. The choice of color depends on the theme of VSCode. There is no reliable way to specify a certain type of text so that the color of the text must be more dimmed than elsewhere.

I might try to make the plain text in the ref tags have a different type to distinguish it from the main text.(e.g. <ref>BookName, ISBN 000</ref>) But for templates and other types of text,(e.g. <ref>{{template}}</ref>)

At last but not the least, it's suggested for me that naming a ref and putting it in the references chapter of the article. This is a good writing practice. As follows:

Hello<ref name="hello" />

== References ==
<references>
<ref name="hello">this is a hello</ref>
</references>

VSCode的語言拓展只是在指定某段特定文字的語法類別,並不是在指定顏色。某類型的文字要渲染成甚麼顏色取決於在VSCode用了甚麼主題。插件本身不能明確指定某種文字會被染成甚麼顏色的,也就沒法保障某段文字確實能染成比較暗的顏色。

我或許會試試指定給ref裡面的純文字內容有不同的類型,這樣就能和正文區分開,不過這種指定只限於ref中的純文本。(例子見上)

另外,個人確實推薦給ref命名然後放在參考資料一章。這樣便於閱讀和管理,我想對除了可視化編輯器之外的人來說都有好處吧。(例子見上)

from wikitext-vscode-extension.

loganteo avatar loganteo commented on June 18, 2024

thank you for your reply and advice, but I'm mostly working on translations instead of creating new articles, that means that it would be much difficult for me to move all those references over just bear it and find texts between refs. So I'll just wait and see what you can do

from wikitext-vscode-extension.

Frederisk avatar Frederisk commented on June 18, 2024

I redefine the categories of some elements, including ref tags, and then launched a sample survey among some users, but the result is that many people seem to dislike this change. A better solution is to use a language server to make the text structure more explicit and provide some contextual support, but I don't have enough time to do so at present.

before:
image_2021-05-28_23-55-05-l

after:
image_2021-05-28_23-55-05-r

from wikitext-vscode-extension.

loganteo avatar loganteo commented on June 18, 2024

I redefine the categories of some elements, including ref tags, and then launched a sample survey among some users, but the result is that many people seem to dislike this change. A better solution is to use a language server to make the text structure more explicit and provide some contextual support, but I don't have enough time to do so at present.

before:
image_2021-05-28_23-55-05-l

after:
image_2021-05-28_23-55-05-r

Thank you for your work! So the changes are not going to publish right? It's fine by me because I've found a workaround for this which is to paste the source code then use the visual editor for contrasting.

from wikitext-vscode-extension.

Frederisk avatar Frederisk commented on June 18, 2024

Yes, it will be changed. That just means that the default options will not be changed.

Here is an improvement method, I will define the content in ref as meta.embedded.block.ref.wikitext (tentative). After that, you can customize the colors you need through the editor.tokenColorCustomizations in the user settings.

How to do it:
Annotation 2021-05-29 174303

from wikitext-vscode-extension.

Frederisk avatar Frederisk commented on June 18, 2024

FYI:

from wikitext-vscode-extension.

Frederisk avatar Frederisk commented on June 18, 2024

Yes, it will be changed. That just means that the default options will not be changed.

Here is an improvement method, I will define the content in ref as meta.embedded.block.ref.wikitext (tentative). After that, you can customize the colors you need through the editor.tokenColorCustomizations in the user settings.

How to do it:
Annotation 2021-05-29 174303

This effect has been adjusted separately, and the name of the range has been determined to be contentName: meta.embedded.block.ref.wikitext (It may change in the future). In addition, you can even adjust this part to be transparent.

Annotation 2021-05-29 174303

from wikitext-vscode-extension.

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.