From 4b0943fdb8a4ef3e37c2716e02eef8b5e4058878 Mon Sep 17 00:00:00 2001 From: Julien Vincent Date: Sat, 12 Oct 2024 16:25:23 +0100 Subject: [PATCH] Update extension docs on adding pairwise queries --- docs/language-extension-spec.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/language-extension-spec.md b/docs/language-extension-spec.md index ab7c628..7685ae7 100644 --- a/docs/language-extension-spec.md +++ b/docs/language-extension-spec.md @@ -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//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