Skip to content

Frederisk/Wikitext-VSCode-Extension

Repository files navigation

Wikitext Markup Language Support Extension for Visual Studio Code

VSMarket: wikitext extension Open VSX: wikitext extension GitHub: wikitext extension Toolhub: wikitext extension

Build GitHub Actions CodeQL CodeFactor Status

@mastodon.social@rwfholme Patreon Donate

This Visual Studio Code Extension provides support of Wikitext Markup language. With this extension, you can more easily discover your grammatical problems through the marked and styled text. The plugin is based on MediaWiki's Wikitext standard, but the rules are somewhat stricter, which helps users write text that is easier to read and maintain.

Of course, the development of this extension is short, and there may be some errors in operation and labeling. If you find a problem, please report it to me immediately for resolution.

If you get help with this project, give this project a star or recommend it to others, thanks!😸

Enhancement Tools

WikiParser Language Server

  • WikiParser Language Server is a powerful tool that brings you better code folding, syntax error prompts, file outline and other features!

WikiParser Usage

  • Install WikiParser Language Server through the extensions store (such as Visual Studio Marketplace) or download the vsix file yourself.
  • Find wikitext.wikiparser.enable in settings and enable it.
  • Press F1 and execute the command wikitext.restartLsp or restart VSCode to apply changes.

WikiParser Previews

Wikitext Extension Gadget

  • Now you can add Wikitext Extension Gadget as a user gadget on your wiki site. And you will get a button to open VSCode directly in your browser to edit the page!

    Go to the gadget's repository page to learn more.

    Wikitext Extension Gadget

Features

  • Color and style annotations of Wikitext can make it easier for users to intuitively find problems in writing grammatical formats.

    Code main page
  • Automatic matching and closing of simple parentheses reduces unnecessary double typing.

    Code video
  • The special comment syntax(<!--#region-->&<!--#endregion-->) can folds the code for easy reading.

    Code region
  • Press Ctrl + Shift + V or click the Preview icon in the title menu bar directly in the Wikitext content to get a parsed preview of Wikitext in the currently active text editor.

    Code previewer
  • Enter @[name] to get a snippet of wikitext. Such as @table, @region, @title...

    Code snippets
  • You can modify the website content by logging in directly in VSCode! Enter the settings page, search Wikitext and find the username and password items, and fill in them. Then press F1 in the text editor, select Post your page to the website!

  • Obtain the Wikitext source code directly in VSCode according to the page name without opening the web page. Press F1 and select Pull page to edit to use this function.

  • Browse the page by entering the page name. Press F1 then select View the page.

Release Notes

  • The syntax of the table has been improved.

Usage

Usage Requirements

Please ensure that your VSCode version is higher than 1.64.0, this version requirements may change in the future.

Generally, make sure that your VSCode is always the latest version.

Development

Development Requirements

How to build this extension yourself

Firstly, clone this repository and change directory to the repository, then install VS Code Extension Manager and other packages:

npm install -g yarn # install yarn classic
yarn install # Install all dependencies

Package this project and you will get a .vsix file:

yarn run package

This is it!