Help us understand the problem. What is going on with this article?

Let's write CWL with Emacs!

More than 1 year has passed since last update.

Hi!

I need a good editor to write CWL.
Here are my requirements for good editor for CWL:
- syntax highlight
- on-the-fly syntax checking (if possible)

Therefore I developed cwl-mode to write CWL with Emacs.

How to install

Add MELPA repository for package.el

You can find cwl-mode in MELPA repository.
To add MELPA to your package repository, add the following code to init.el.

init.el
(require 'package)
(add-to-list 'package-archives
 '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

Install cwl-mode

You can install it by M-x package-install cwl-mode.

(optional) Install Flycheck

Emacs can provide on-the-fly syntax checking for CWL after installing Flycheck.
You can install it by M-x package-install flycheck because it is also provided in MELPA repository.

Install syntax checking tools

CWL checker in Flycheck uses schema-salad-tool and CWL syntax definition written in SALAD format.

You can install schema-salad-tool from PyPI by using the following command.

$ pip install schema_salad

The syntax definition file is provided in CWL repository in Github.
This article uses the definition file that is bundled with cwltool, that is a reference implementation of workflow engine for CWL.

You can install it using the following command:

$ pip install cwltool

Set up CWL checker

Set the path for CommonWorkflowLanguage.yml to flycheck-cwl-schema-path.
Please fix the path for CommonWorkflowLanguage.yml if needed.

init.el
(setq flycheck-cwl-schema-path "/Users/tom-tan/.pyenv/versions/3.6.2/lib/python3.6/site-packages/cwltool/schemas/v1.0/CommonWorkflowLanguage.yml")

Done!

You can see the contents of CWL file highlighted when you open files whose names are ended with .cwl.
Also, your Emacs can provide on-the-fly syntax checking feature after you install Flycheck.
Have fun!

See also: Emacs でも CWL を編集したい! (same article in Japanese)

tm_tn
Emacs とか D とかで遊ぶのが趣味です.
https://tom-tan.hatenablog.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした