Skip to content

Commit

Permalink
Merge pull request #69 from julienvincent/jv/ref-pnlyypvysmzr
Browse files Browse the repository at this point in the history
Update extension docs on adding pairwise queries
  • Loading branch information
julienvincent authored Oct 12, 2024
2 parents 1f317b2 + 4b0943f commit 001bbec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/language-extension-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ local language_extension = {
}
```

See also [the clojure implementation](../lua/nvim-paredit/lang/clojure.lua) for a good reference.
See [the clojure implementation](../lua/nvim-paredit/lang/clojure.lua) for a good reference implementation.

In addition to implementing the above API it is also necessary to provide pairwise treesitter queries if you want
paredit to support [pairwise dragging](../README.md#pairwise-dragging) in the language you are building for. This is
completely optional but will provide a better experience.

You can do this by adding a `queries/<language>/paredit/pairwise.scm` file to your plugin. See the [clojure
queries](../queries/clojure/paredit/pairwise.scm) for a good reference on how to write these queries.

## Registration

Expand Down

0 comments on commit 001bbec

Please sign in to comment.