Git Product home page Git Product logo

vscode-webgal-highlighting's Introduction

WebGAL Support for Visual Studio Code

Available languages: 简体中文 / English

GitHub: https://github.com/LittleYe233/vscode-webgal-highlighting

NPM: https://www.npmjs.com/package/vscode-webgal-highlighting

npm GitHub license GitHub issues

This package is a Visual Studio Code extension to provide language support for MakinoharaShoko/WebGAL.

WebGAL is a brand new visual novel engine based on Web and is still under development and code refactoring with its stable releases published.

Now this extension is still being tested and waiting for more stable syntaxes supported by WebGAL.

We will keep trying to make this extension provide more support for WebGAL in the future, including more complicated language support (semantic highlighting).

Features

  • Syntax highlighting
    • Keywords (changeBG, if, setVar, etc.)
    • Comments

Note: This extension doesn't specify any preferred file type to provide language support, for the extension of all WebGAL scripts is ".txt". You can specify the viewing language to "WebGAL Script (webgal)" for the scripts at the right bottom corner of Visual Studio Code.

Usage

Normal users

There is no more requirement for normal users. Just install the extension in the marketplace and enjoy it.

Developers

All requirements on dependencies are written in package.json. After cloning the repository, execute npm install in it via your preferred terminal.

Develop with YAML

VS Code uses JSON files (*.tmLanguage.json) to highlight code, but it's sometimes a bit annoying to write these highlighting rules in JSON format. So you can write them into YAML files first, and then convert them to JSON files.

package.json just provides an option to easily convert YAML to JSON - js-yaml. To use it, first install it globally via npm install -g js-yaml. After installing it and writing some rules in syntaxes/webgal.tmLanguage.yml, execute js-yaml syntaxes/webgal.tmLanguage.yml > syntaxes/webgal.tmLanguage.json to apply your changes.

Of course, don't worry to directly commit your changes on JSON files - we will merge these changes and convert them to YAML later.

Test locally

If you want to test this extension locally, open a new VS Code window in the repository folder and press F5 to start a debugger. It will automatically load this extension and you can have a try just like normal users.

Additionally, you can choose "Developer: Inspect Editor Tokens and Scopes" from the command palette (launch it via Ctrl+Shift+P) to get a deeper insight into how the extension works and whether it labels all the tokens and scopes correctly or not.

Contribute

Everyone is welcome to create issues and pull requests here.

There are only few suggestions for developers who create PRs:

  • Conventional Commits

    It's better to commit your changes in favor of it. More specifically,

    • please add a <type> like feat, chore, build, revert for your commits;
    • non-English <description> and [optional body] of a commit can be accepted;
    • you can set up husky to lint your commits;
    • if your commits will close any issue or PR, please take advantage of [optional footer(s)] like Close #xx and PR Close #xx (accepted as long as GitHub supports it).
  • Scope naming

    It's better to choose appropriate names for your scopes. TextMate 1.x Manual is mentioned in the official documentation of VS Code language extension, which includes a detailed list of conventional scope names. Also you can have a look at the built-in language files in VS Code, i.e. json.tmLanguage.json.

  • Branches

    The upstream branch of your pull requests should be main, not dev. There is an issue written in Chinese explaining why.

Release Notes

Please check CHANGELOG.md.

vscode-webgal-highlighting's People

Contributors

littleye233 avatar

Stargazers

 avatar Sunset avatar Mahiru avatar

Watchers

James Cloos avatar Mahiru avatar  avatar

vscode-webgal-highlighting's Issues

有关 `dev` 分支

这段说明不长,等再凑一些文字再写代码库中。

TL;DR: 请直接无视 dev 分支,而是向 main 分支发出 PR。

Full:

原先这个仓库是由我一人维护。我的习惯是在主分支 main 基础上再分出一个开发分支 dev,主要是用来测试一些正在开发的功能,甚至用来作远端的“暂存区”(git stash 的数据存储在本地,其他设备无法直接获取其中的代码),或者是 rebase 后强制 push,因此这个分支不适合作为上游分支。

现在如果这个项目有其他贡献者,dev 分支的名字可能会产生混乱。故特此说明:目前本项目用来协作的只有 main 分支,需要 PR 时请直接将上游设为该分支;dev 分支仅是我个人作开发时使用的分支,无“开发版本”“重构版本”之意。

近况

没想到还有人 watch/fork/star,受宠若惊。

之前一直有公私方面的事情,未能继续更新。现在稍微清闲一些,又看到 webgal 项目大迭代和更新语法,考虑一下还是接着更。

没放 README 是因为还要 commit 一次,麻烦。

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.