1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:20:03 +08:00
SpaceVim/docs/layers/lang/clojure.md

71 lines
1.7 KiB
Markdown
Raw Normal View History

2018-09-14 22:23:40 +08:00
---
title: "SpaceVim lang#clojure layer"
2021-06-21 20:39:29 +08:00
description: "This layer is for Clojure development, provides autocompletion, syntax checking, code format for Clojure files."
2018-09-14 22:23:40 +08:00
---
# [Available Layers](../../) >> lang#clojure
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Install](#install)
2021-05-07 19:29:32 +08:00
- [Layer options](#layer-options)
2020-10-07 22:34:35 +08:00
- [Key bindings](#key-bindings)
- [Running current script](#running-current-script)
- [Inferior REPL process](#inferior-repl-process)
2018-09-14 22:23:40 +08:00
<!-- vim-markdown-toc -->
## Description
2019-02-03 20:51:01 +08:00
This layer is for Clojure development, and it includes vim-clojure-static and vim-fireplace.
2018-09-14 22:23:40 +08:00
## Features
- Code completion
- Syntax highlighting
- Indent
- Code formatting
- REPL support
## Install
2021-06-21 20:39:29 +08:00
To use this configuration layer, update your custom configuration file with:
2018-09-14 22:23:40 +08:00
```toml
[[layers]]
name = "lang#clojure"
```
2020-10-07 22:34:35 +08:00
2021-05-07 19:29:32 +08:00
## Layer options
- `clojure_interpreter`: Set the clojure interpreter, by default, it is
`clojure`
```toml
[[layers]]
name = 'lang#clojure'
clojure_interpreter = 'path/to/clojure'
```
2020-10-07 22:34:35 +08:00
## Key bindings
### Running current script
2021-06-21 20:39:29 +08:00
To run a clojure file, you can press `SPC l r` to run the current file without losing focus,
2020-10-07 22:34:35 +08:00
and the result will be shown in a runner buffer.
### Inferior REPL process
Start a `clojure` inferior REPL process with `SPC l s i`.
Send code to inferior process commands:
| Key Bindings | Descriptions |
| ------------ | ------------------------------------------------ |
| `SPC l s b` | send buffer and keep code buffer focused |
| `SPC l s l` | send line and keep code buffer focused |
| `SPC l s s` | send selection text and keep code buffer focused |