Giter VIP home page Giter VIP logo

vscode-cylc's Introduction

vscode-cylc

A Visual Studio Code extension that provides language support for Cylc workflow configuration files.

Features

  • Syntax highlighting:
    • Cylc 7
    • Cylc 8
    • Jinja2 (can be used with a Jinja extension e.g. Better Jinja)
  • Snippets for Cylc 8 sections/settings

Screenshot

Screenshot of syntax highlighting

Installation

Either:

Issues

Please report any syntax highlighting issues at cylc/cylc-textmate-grammar. Any other issues with the extension should be reported here.

Contributing

Syntax highlighting

This repo includes the cylc/cylc-textmate-grammar repo as a git submodule in the /syntaxes/ directory. If you don't have experience with submodules, you should read the docs first.

The cylc-textmate-grammar repo contains a JSON TextMate grammar file which is used by VSCode for syntax highlighting. Read the VSCode syntax highlight guide for more information.

Important

Do not edit the JSON file when contributing; instead you should edit the JavaScript grammar file and build it, as explained in the contributing section of cylc-texmate-grammar.

To install a development version of this extension:

git clone --recurse-submodules https://github.com/cylc/vscode-cylc.git

The --recurse-submodules option automatically initialises the cylc-textmate-grammar repo in the /syntaxes directory.

Run/debug the development version in a new window by pressing F5.

You can then edit the /syntaxes/src/cylc.tmLanguage.js grammar file. First, read the contributing section of the cylc-textmate-grammar repo - any such edits will be part of that repo as opposed to this vscode-cylc repo. After editing & saving the file, there is a build shortcut task (in /.vscode/tasks.json) which can be triggered by Ctrl+Shift+B. This will run the cylc-textmate-grammar build script which compiles the JSON grammar file. Reload the debugging window using the button on the toolbar or Ctrl+Shift+F5

Note

Contributions to VSCode-specific features, e.g. bracket matching or snippets, are to be made in this repo, not the submodule.

Snippets

Snippets are simply generated from the Cylc 8 workflow configuration spec by running:

./bin/build_snippets.py

or using the VSCode build task (Ctrl+Shift+B).

The latest version of cylc-flow should be installed for this to work.

vscode-cylc's People

Contributors

metronnie avatar oliver-sanders avatar wxtim avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-cylc's Issues

Add snippets

Snippets allow us to highlight features of Cylc, and to make starting a new workflow easier for end users.

For example, most users starting to write a new workflow will find the following handy:

	"scheduling section": {
		"prefix": ["scheduling", "schd"],
		"body": [
			"[scheduling]",
			"    initial cycle point = ${1:1066}",
			"    [[graph]]",
			"        ${2:R1} = ${3:foo}"
		]
	},

This is largely a brain dump because I've just started using snippets.

Publisher access for members

Currently only Oliver and I have ownership of the "publisher". Only personal access tokens of owners can be used for deploying the extension to he Visual Studio Marketplace. In order for us to be able to add other members, I suspect you will need to go to https://azure.microsoft.com/en-us/services/devops/ and click "Sign in to Azure DevOps" under "Already have an account?"

flow.cylc.processed not being recognised

Opening a flow.cylc.processed file opens as plain text instead of a Cylc file. Strange I'm getting this, I could have sworn it worked in the past. Possibly the way filenames/extensions are handled has changed slightly in recent versions of VSCode

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.