Outils pour utilisateurs

Outils du site


prog:vsc:module_highlight

Ceci est une ancienne révision du document !


Prérequis

Node.js

Il faut installer Node.js qui possède une application pour créer un squelette de module.

Installer les programmes yo et generator-code par :

npm install -g yo generator-code

Création du module

Générer le module de base pour la coloration syntaxique :

yo code

Résultat de la console :

? ==========================================================================
We're constantly looking for ways to make yo better! 
May we anonymously report usage statistics to improve the tool over time? 
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== Yes
     _-----_     ╭──────────────────────────╮
    |       |    │   Welcome to the Visual  │
    |--(o)--|    │   Studio Code Extension  │
   `---------´   │        generator!        │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? What type of extension do you want to create? New Language Support
Enter the URL (http, https) or the file path of the tmLanguage grammar or press ENTER to start with a new grammar.
? URL or file to import, or none for new:
? What's the name of your extension? CELLman Lang
? What's the identifier of your extension? cellman-lang
? What's the description of your extension? Syntax highlighting for CELLman lang
Enter the id of the language. The id is an identifier and is single, lower-case name such as 'php', 'javascript'
? Language id: cellman
Enter the name of the language. The name will be shown in the VS Code editor mode selector.
? Language name: CELLman
Enter the file extensions of the language. Use commas to separate multiple entries (e.g. .ruby, .rb)
? File extensions: .cmc, .TRAN
Enter the root scope name of the grammar (e.g. source.ruby)
? Scope names: source.cmc
? Initialize a git repository? Yes
   create cellman-lang\syntaxes\cellman.tmLanguage.json
   create cellman-lang\.vscode\launch.json
   create cellman-lang\package.json
   create cellman-lang\README.md
   create cellman-lang\CHANGELOG.md
   create cellman-lang\vsc-extension-quickstart.md
   create cellman-lang\language-configuration.json
   create cellman-lang\.vscodeignore
   create cellman-lang\.gitignore
   create cellman-lang\.gitattributes

Your extension cellman-lang has been created!

To start editing with Visual Studio Code, use the following commands:

     cd cellman-lang
     code .

Open vsc-extension-quickstart.md inside the new extension for further instructions
on how to modify, test and publish your extension.

For more information, also visit http://code.visualstudio.com and follow us @code.
prog/vsc/module_highlight.1611917622.txt.gz · Dernière modification : 2021/01/29 11:53 de root