Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrkkrp/common-lisp-snippets
Yasnippets for Common Lisp
https://github.com/mrkkrp/common-lisp-snippets
common-lisp emacs snippets yasnippet
Last synced: 3 months ago
JSON representation
Yasnippets for Common Lisp
- Host: GitHub
- URL: https://github.com/mrkkrp/common-lisp-snippets
- Owner: mrkkrp
- Created: 2015-05-26T09:46:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T22:57:49.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T10:32:35.380Z (3 months ago)
- Topics: common-lisp, emacs, snippets, yasnippet
- Language: YASnippet
- Size: 19.5 KB
- Stars: 43
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yasnippets for Common Lisp
[![License GPL 3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)
[![MELPA](https://melpa.org/packages/common-lisp-snippets-badge.svg)](https://melpa.org/#/common-lisp-snippets)
[![Build Status](https://travis-ci.org/mrkkrp/common-lisp-snippets.svg?branch=master)](https://travis-ci.org/mrkkrp/common-lisp-snippets)This is a collection of Yasnippets for Common Lisp. It includes snippets for
top-level forms and (as a bonus) headers for popular free-software licenses:
GNU GPL and MIT License.## Installation
To use these snippets you need to install
the [Yasnippet](https://github.com/capitaomorte/yasnippet) package. Once you
have Yasnippet installed, place contents of this repository on your load
path, so Emacs can see it and add the following to your configuration file:```emacs-lisp
(require 'common-lisp-snippets)
```It's now available via MELPA: M-x package-install RET
common-lisp-snippets RET—and you are done!## Usage
To insert a snippet, type its name and press ↹ Tab or
C-i, for example:```common-lisp
defsystem
⇒
(asdf:defsystem :system-name
:version "0.1.0"
:description "description"
:author "user-full-name "
:serial t
:license "GNU GPL, version 3"
:components ((:file "file.lisp"))
:depends-on (#:alexandria))```
…you can move through the fields pressing ↹ Tab and edit or
delete them. Some fields, like `:author` try to guess their values.As a special bonus, there are snippets to insert headers of files that
contain information about the software license (`gnugpl` and `mitlic`), they
are smart too.## Contributions
There are some stylistic conventions:
* Name files without extensions.
* Start every file with this preamble:
```
# -*- mode: snippet -*-
# contributor: your name
# name: readable name of the snippet
# key: what user needs to enter
# --
```The first line is needed to activate mode for snippet editing in Emacs,
Yasnippet ships with it.* Make sure your files don't have an empty line at the end. This is
important, because it will be inserted when your snippet is expanded.
`snippet-mode` takes care of this, setting `require-final-newline` to
`nil`, just make sure you haven't put it there manually.## License
Copyright © 2015–2017 Mark Karpov
Distributed under GNU GPL, version 3.