diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c3263..03618c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added + - Ability to distribute via package managers - Support for `completion-at-point-functions` and `company` via `company-capf` ### Changed diff --git a/README.md b/README.md index 74a9e36..49d9706 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,73 @@ -Scel -==== +# scel - sclang-mode for emacs SuperCollider/Emacs interface +## Installation -Installation requirements -------------------------- +The repository contains two subprojects. `/sc` contains the SuperCollider code +required to implement the emacs interface. `/el` contains the emacs-lisp +implementation of the mode. Emacs and SuperCollider have their own package +managers, so it is required to install each half separately. -For the HTML help system, you will need emacs-w3m support. +If you are building SuperCollider from source on Linux, this library (both .el +and .sc files) will be installed by default. To disable it pass the flag +`-DSC_EL=OFF` as a `cmake` option. See the supercollider readme for more info. +### Installing scel quark -Installation (default) ----------------------- +The `scel` Quark is required for emacs to communicate with sclang. -By default emacs-lisp files are installed in +``` supercollider +Quarks.install("https://github.com/supercollider/scel"); +``` -`$prefix/share/emacs/site-lisp` +### Installing the emacs mode -SuperCollider files are put in +Install as you normally would install something from MELPA: -`$prefix/share/SuperCollider/Extensions/scide_scel` +``` emacs-lisp +(package-install "sclang") +``` +Or using straight.el +``` emacs-lisp +(package! sclang + :recipe (:host github + :repo "supercollider/scel" + :files ("el/*.el"))) +``` -The only thing you need to do is loading the sclang interface in your `~/.emacs`: +## Installation requirements -``` -(require 'sclang) -``` +For the HTML help system, you will need emacs-w3m support, but you can still use without that. -For the HTML help system to fully function also add -``` +```emacs-lisp (require 'w3m) ``` +## Configuration -Installation (detailed) ------------------------ - -Put all `*.el` files in emacs' load-path. e.g. if you put them in -`~/emacs/`, add the following lines to `~/.emacs` (or whatever your init -file is called): +To fine-tune the installation from within emacs' graphical customization interface, type: -``` -(add-to-list 'load-path "~/emacs") -(require 'sclang) -``` +`M-x sclang-customize` -for the HTML help system to fully function also add -``` -(require 'w3m) -``` +### On MacOS -now put all `*.sc` files in sclang's library path, e.g. if you put them -in a non-standard location, such as `~/SuperCollider/Emacs`, add the -following to `~/.config/SuperCollider/sclang_conf.yaml` (Linux) or `~/Library/Application Support/SuperCollider/sclang_conf.yaml` (macOS): +You may need to add the path to supercollider to your exec-path so that it can find the sclang executable. -``` -includePaths: - [~/SuperCollider/Emacs] +``` emacs-lisp +(setq exec-path (append exec-path '("/Applications/SuperCollider.app/Contents/MacOS/"))) ``` -(note normally this is not needed as they are put into sclang's library -path during installation with scons). +## Usage -Usage ------ +`M-x sclang-start` or open a `.scd` file and press `C-c C-o` -In order to automatically start sclang when invoking emacs, use the following command line: +You're now ready to edit, inspect and execute sclang code! -``` -$> emacs -sclang -``` -you're now ready to edit, inspect and execute sclang code! - - -Getting help ------------- +## Getting help Inside an sclang-mode buffer (e.g. by editing a .sc file), execute @@ -108,18 +98,7 @@ in your `~/.emacs`: This ensures that the arrow keys are just for moving through the document, and not from hyperlink to hyperlink, which is the default in w3m-mode. -Customization -------------- - -To fine-tune the installation from within emacs' graphical customization interface, type: - -`M-x sclang-customize` - -In particular, you will have to customize `sclang-runtime-directory'. - - -Server control --------------- +## Server control In the post buffer window, right-click on the server name; by default the two servers `internal` and `localhost` are available. You will get a menu with common server control operations.