https://github.com/ailiop/cilk-mode

Emacs minor mode for editing Cilk source code

https://github.com/ailiop/cilk-mode

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.2%) to scientific vocabulary

Keywords

cilk emacs
Last synced: 9 months ago · JSON representation

Repository

Emacs minor mode for editing Cilk source code

Basic Info
  • Host: GitHub
  • Owner: ailiop
  • License: mit
  • Language: Emacs Lisp
  • Default Branch: main
  • Homepage:
  • Size: 612 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
cilk emacs
Created over 5 years ago · Last pushed almost 4 years ago
Metadata Files
Readme License

README.md

cilk-mode

MELPA MELPA Stable MIT License

Emacs minor mode for Cilk source code editing.

Contents

Features

This package provides cilk-mode, a minor mode that can be activated in buffers with major mode c-mode, c++-mode, or derived modes. The cilk-mode minor mode enables the features listed in the following table and described below.

| Feature | Function | Auto-enable variable | |:-----------------------------------|:------------------------------|:-------------------------------------| | Cilk keyword indentation | cilk-mode-cc-keywords | cilk-mode-enable-cc-keywords | | Cilk keyword highlighting | cilk-mode-font-lock | cilk-mode-enable-font-lock | | Flycheck with OpenCilk | cilk-mode-flycheck-opencilk | cilk-mode-enable-flycheck-opencilk |

By default, all features are activated/deactivated together with cilk-mode.

  • To explicitly enable, disable, or toggle a feature, use the corresponding function in the table above. The functions do not require cilk-mode to be active (but it must be loaded, of course).
  • To prevent a feature from being automatically enabled in cilk-mode, set the corresponding auto-enable variable to nil.

Correct indentation with Cilk keywords in CC Mode

| | | |:-------------------------------------------:|:-----------------------------:| | in c-mode, before cilk-mode-cc-keywords | after cilk-mode-cc-keywords |

Custom font-lock face for Cilk keyword highlighting

Cilk keywords are fontified with the cilk-mode-parallel-keyword face. By default, the latter is the same as font-lock-keyword-face but can be customized without affecting the "regular" C/C++ keywords.

| | | |:-------------------------------:|:---------------------------------------------:| | before cilk-mode-font-lock | after cilk-mode-font-lock (customized face) |

Flycheck syntax checking with OpenCilk

The path to the OpenCilk compiler is set in cilk-mode-flycheck-opencilk-executable. This feature requires the flycheck package and works with the flycheck-mode minor mode.

| | | |:------------------------------------:|:-----------------------------------:| | before cilk-mode-flycheck-opencilk | after cilk-mode-flycheck-opencilk |

Installation

Manual

Download cilk-mode.el and add the following to your .emacs file:

emacs-lisp (add-to-list 'load-path "/path/to/cilk-mode-parent-dir") (require 'cilk-mode)

MELPA

Users of GNU Emacs (version 24.1 or greater) can install cilk-mode via MELPA. To use the MELPA repository, make sure you have the following in your .emacs file:

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

Then, run M-x package-list-packages to find and install cilk-mode.

For more information, see the MELPA Getting Started Guide.

Doom Emacs

In .doom.d/packages.el:

emacs-lisp (package! cilk-mode :recipe (:host github :repo "ailiop/cilk-mode"))

Configuration example

GNU Emacs

In your .emacs file:

``` emacs-lisp ;; load package (add-to-list 'load-path "/path/to/cilk-mode-parent-dir") ; if necessary (require 'cilk-mode)

;; automatically enable cilk-mode within c-mode and c++-mode (dolist (h '('c-mode-hook 'c++-mode-hook)) (add-hook h #'cilk-mode))

;; customize Cilk keyword face (set-face-attribute 'cilk-mode-parallel-keyword nil :foreground "#FDA900") ; mustard color

;; customize path to the OpenCilk compiler (for use with flycheck) (setq cilk-mode-opencilk-executable "/opt/opencilk-2/bin/clang") ```

Doom Emacs

In .doom.d/config.el:

``` emacs-lisp (use-package! cilk-mode :command cilk-mode :config (set-face-attribute 'cilk-mode-parallel-keyword nil :foreground "#FDA900") ; mustard color (setq cilk-mode-opencilk-executable "/opt/opencilk-2/bin/clang"))

(add-hook! '(c-mode c++-mode) #'cilk-mode) ```

Owner

  • Name: Alexandros-Stavros Iliopoulos
  • Login: ailiop
  • Kind: user
  • Location: Cambridge, MA, USA
  • Company: Massachusetts Institute of Technology

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels