Skip to content

Commit 7a988f1

Browse files
authored
Merge branch 'master' into feat/form-update-api
2 parents 3dd62c3 + 5500eef commit 7a988f1

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

README.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ The goal of `nvim-paredit` is to provide a comparable s-expression editing exper
1818
- Language extensibility
1919
- Programmable API
2020

21+
---
22+
23+
![Demo](./assets/demo.gif)
24+
2125
## Project Status
2226

23-
This is currently **alpha software**.
27+
This is currently **beta software**. It works well in the workflows of the current maintainers but has not been thoroughly tested with many users.
2428

25-
You will experience bugs and there are still several unimplemented operations. The fundamental operations are mostly complete and probably work as expected in 90% of cases. You can probably switch to using this full time if you can tolerate some oddities and don't need the unimplemented operations.
29+
It currently only has first-class support for the `clojure` language and has a focus on supporting the fundamental paredit operations and motions.
2630

2731
## Installation
2832

@@ -37,17 +41,6 @@ You will experience bugs and there are still several unimplemented operations. T
3741
}
3842
```
3943

40-
### Using [Packer](https://github.com/wbthomason/packer.nvim)
41-
42-
```lua
43-
use {
44-
"julienvincent/nvim-paredit",
45-
config = function()
46-
require('nvim-paredit').setup()
47-
end,
48-
}
49-
```
50-
5144
## Configuration
5245

5346
```lua
@@ -95,7 +88,9 @@ require("nvim-paredit").setup({
9588

9689
As this is built using Treesitter it requires that you have the relevant Treesitter grammar installed for your language of choice. Additionally `nvim-paredit` will need explicit support for the treesitter grammar as the node names and metadata of nodes vary between languages.
9790

98-
Right now `nvim-paredit` only has built in support for `clojure` but exposes an extension API for adding support for other lisp dialects. Extensions can either be added as config when calling `setup`:
91+
Right now `nvim-paredit` only has built in support for `clojure` but exposes an extension API for adding support for other lisp dialects. This API is considered **very alpha** and may change without warning to properly account for other languages when attempts are made to add support.
92+
93+
Extensions can either be added as config when calling `setup`:
9994

10095
```lua
10196
require("nvim-paredit").setup({
@@ -140,9 +135,13 @@ Or by calling the `add_language_extension` API directly before the setup. This w
140135
require("nvim-paredit.lang").add_language_extension("commonlisp", { ... }).
141136
```
142137

138+
---
139+
140+
As no attempt has been made to add support for other grammars I have no idea if the language extension API's are actually sufficient for adding additional languages. They will evolve as attempts are made.
141+
143142
## API
144143

145-
The api is exposed as `paredit.api`:
144+
The core API is exposed as `paredit.api`:
146145

147146
```lua
148147
local paredit = require("nvim-paredit")
@@ -161,3 +160,20 @@ paredit.api.slurp_forwards()
161160
- **`raise_form`**
162161
- **`move_to_next_element`**
163162
- **`move_to_prev_element`**
163+
164+
## Prior Art
165+
166+
### [vim-sexp](https://github.com/guns/vim-sexp)
167+
168+
Currently the de-facto s-expression editing plugin with the most extensive set of available editing operations. If you are looking for a more complete plugin with a wider range of supported languages then you might want to look into using this instead.
169+
170+
The main reasons you might want to consider `nvim-paredit` instead are:
171+
172+
+ Easier configuration and an exposed lua API
173+
+ Control over how the cursor is moved during slurp/barf. (For example if you don't want the cursor to always be moved)
174+
+ Recursive slurp/barf operations. If your cursor is in a nested form you can still slurp from the forms parent(s)
175+
+ Subjectively better out-of-the-box keybindings
176+
177+
### [vim-sexp-mappings-for-regular-people](https://github.com/tpope/vim-sexp-mappings-for-regular-people)
178+
179+
A companion to `vim-sexp` which configures `vim-sexp` with better mappings. The default mappings for `nvim-paredit` were derived from here.

assets/demo.gif

1.03 MB
Loading

0 commit comments

Comments
 (0)