Skip to content

Releases: julienvincent/nvim-paredit

v1.1.0

16 Oct 17:12
350ca86
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.1.0

v1.0.0

13 Oct 13:17
ab7db43
Compare
Choose a tag to compare

Notable Changes

Fixes

Features

Misc

Pairwise Dragging

This is a big quality of life feature addition which allows identifying elements that are considered logical pairs (such as the elements within a clojure map) and dragging them together with their pair.

See https://github.com/julienvincent/nvim-paredit/tree/v1.0.0?tab=readme-ov-file#pairwise-dragging

Language Queries

This is a large rework of the internals of nvim-paredit which replace the current language-extension API with treesitter queries. This makes the paredit implementation significantly more grammar agnostic and drastically simplifies the task of extending nvim-paredit to other languages.

As a result of this it became trivial to support languages other than clojure directly within nvim-paredit. Nvim-paredit now comes with out-of-the-box support for fennel and scheme in addition to the pre-existing clojure support.

This change removes the need for the third-party language-extension APIs found here:

If you were using either of these extensions you can remove them and everything should continue to work the same (or better! hopefully).

If you were using your own extension or an extension not found here then you will need to replace it with some treesitter queries.

See https://github.com/julienvincent/nvim-paredit/blob/v1.0.0/docs/language-queries.md for more information.

New Contributors

  • @taw10 made their first contribution in #59

Full Changelog: v0.11.0...v1.0.0

v0.11.0

11 Mar 08:29
54e4265
Compare
Choose a tag to compare

Notable Changes

Features

  • Added support for moving between head and tail of next and previous elements - #39
  • Added support for moving between parent form's edges using ( and ) - #38
  • Added support for 'splice' or form unwrapping which is by default bound to <localleader>@ - #45

Fixes

  • Fixed a bug with motions where when used in operator-pending mode it would operate on 1 too many characters - #46
  • Fixed some performance issues with wrap + insert API's - #52
  • Fixed an issue with a breaking change to ts.swap_nodes on Neovim nightly - #54
  • Got tests passing on neovim nightly - #58

Misc

A new scheme language extension has been created by @ekaitz-zarraga! You can find it here https://github.com/ekaitz-zarraga/nvim-paredit-scheme

New Contributors


Full Changelog: v0.10.0...v0.11.0

0.10.0

25 Sep 10:10
df1c7b8
Compare
Choose a tag to compare

Top Level Form text-object-selections

In addition to the existing text-object selections for forms (af/if) nvim-paredit now also supports top level form text-object selections which mapped to aF/iF.

Thanks @Olical for the contribution!

Fixes

  • A bug which broke keymaps when disabling an individual keymap was fixed

0.9.0

11 Sep 15:04
b68207e
Compare
Choose a tag to compare

New Features

Auto Indentation

Nvim-paredit can now automatically fix form/element indentation when performing slurp and barf operations! You can read more about this here: https://github.com/julienvincent/nvim-paredit/tree/v0.9.0#auto-indentation.

Please note that this is disabled by default. To use this feature you can enable it by setting indent.enabled = true in your configuration.

Fennel Support

Language support for Fennel has been added! This is done through a new language extension plugin which can be found here: https://github.com/julienvincent/nvim-paredit-fennel

This is still pretty experimental. Please open any issues with this on the nvim-paredit-fennel repo.

Fixes

  • Some tweaks to the language extension API were made which allow language extension plugins to register themselves lazily.
  • An issue where the cursor was not placed correctly in some cases was fixed. This was a breaking change to the cursor API.

Misc

  • Default keymaps can now be disabled by setting them to false or nil.

0.8.0

21 Aug 18:44
b03534c
Compare
Choose a tag to compare

New Features

Form/Element Wrap API

Added a new suite of API's for wrapping elements/forms with brackets. These are not exposed as default keybindings but rather as API's which can be composed by the user.

See more here: https://github.com/julienvincent/nvim-paredit/tree/v0.8.0#api-usage-recipes

Changes/Fixes

  • The default keymaps for slurp/barf backwards were inverted with respect to vim-sexp-mappings-for-regular-people and have been corrected
  • In addition to af/if keymaps, element-wise text-selection bindings ae and ie have been added by to the defaults

0.7.0

12 Aug 12:21
3237777
Compare
Choose a tag to compare

New Features

Text object selections

Added support for form and element text object selections. This adds the af and if keybindings which work in operator-pending mode, allowing you to type chords like dif to delete everything inside a form or daf to delete everything around a form. This works with d, c, y, v and friends.

Form/Element deletions APIs

Internally using the text object selections, a programatic API for deleting forms and elements was added.

paredit.delete_form()
paredit.delete_in_form()
paredit.delete_element()

Fixes

  • Using motions with v:count now properly respects count. For example, d2E or y2B now work correctly.

Other

The way keybindings are setup has changed, specifically the operator = true option has been removed and a new modes = {} has been added as a replacement. This allows setting the modes for a keybinding explicitly.

The motions API's were changed to automatically detect operator-pending mode instead of them needing to be wrapped in normal! v when operator = true was set.

If you were using custom keybindings that used operator = true you will need to update your mappings. For example:

-- Before
require("nvim-paredit").setup({
  keys = {
    ["E"] = { 
      paredit.api.move_to_next_element,
      "Jump to next element tail",
      repeatable = false,
      operator = true,
    }
  }
})

-- after
require("nvim-paredit").setup({
  keys = {
    ["E"] = { 
      paredit.api.move_to_next_element,
      "Jump to next element tail",
      repeatable = false,
      mode = { "n", "x", "o", "v" },
    }
  }
})

0.6.0

07 Aug 19:46
d7eb67e
Compare
Choose a tag to compare
  • Add v:count support to motions
  • Fix a bug which would throw an error if a motion was used while cursor was placed on a comment

0.5.2

27 Jun 22:37
94c5e5d
Compare
Choose a tag to compare
v0.5.2

Ensure default config options are applied

0.5.1

19 Jun 15:56
f700055
Compare
Choose a tag to compare
v0.5.1

Raise form should operate on the root of the form