Code Monkey home page Code Monkey logo

emacs-scopes-mode's Introduction

scopes-mode

Emacs major mode for the Scopes programming language. Highlights all keywords and numbers, along with all symbols defined in core.sc and the default modules.

Usage

For plugin generation, make sure you have initialized the submodule by cloning with --recursive or use git submodule update --init in the already cloned folder. The plugin is partially generated by a scopes program (generator.sc). To generate a new version launch in a shell:

scopes generator.sc > scopes-symbols.el

The elisp library itself is already set up to use that file so no further actions are needed. A pre generated version is already included in the repository for convenience, so generation is only necessary if it's out of date.

Installation

We assume a vanilla emacs installation. Refer to the documentation of your particular distribution or plugin if necessary.

To load scopes-mode, add the following to your init.el or similar startup file:

(load "path/to/scopes-mode.el")

Or if you have a load-path already defined e.g.:

(add-to-list 'load-path "~/.emacs.d/libs")

You can copy or symlink scopes-mode.el and scopes-symbols.el to the ~/.emacs.d/libs folder and add the following line to your config:

(require 'scopes-mode)

To have scopes mode activate automatically when opening a file, add the following:

(add-to-list 'auto-mode-alist '("\\.sc\\'" . scopes-mode))

Screenshots

light theme dark theme

Special thanks

  • @flatwhatson for the help with the comment highlighting regex.
  • @hlissner for general emacs help; The indentation routine was also written while looking at the pug-mode package for reference.

emacs-scopes-mode's People

Contributors

radgerayden avatar salotz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

salotz

emacs-scopes-mode's Issues

Running generator fails

Scopes newbie here. Running Hg tip as of today.

 ~/dev/emacs-scopes-mode
> scopes generator.sc > scopes-symbols.el
unknown:1:1: while loading module /home/mlabbe/dev/emacs-scopes-mode/generator.sc
/home/mlabbe/dev/emacs-scopes-mode/generator.sc:2:1: while expanding
    symbols := (import .scopes-std-symbols.symbols)
/home/mlabbe/dev/emacs-scopes-mode/generator.sc:2:12: while expanding sugar macro
    symbols := (import .scopes-std-symbols.symbols)
               ^
error: failed to import module '.scopes-std-symbols.symbols'
no such module '.scopes-std-symbols.symbols' in paths:
    /home/mlabbe/dev/emacs-scopes-mode/scopes-std-symbols/symbols.sc
    /home/mlabbe/dev/emacs-scopes-mode/scopes-std-symbols/symbols/init.sc
> find ../scopes/ -name "*symbols*"
../scopes/src/known_symbols.hpp
> hg log |head
changeset:   2190:da073d23ab09
tag:         tip
user:        Leonard Ritter <[email protected]>
date:        Mon Jun 01 07:43:29 2020 +0200
summary:     * `Set`: fixed discarding being broken when the element type is unique

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.