Releases: julienvincent/nvim-paredit
v1.1.1
What's Changed
- Fix pairwise drag dragging beyond form boundaries by @julienvincent in #79
- Improve clojure pairwise queries by @julienvincent in #80
- Swap both elements of a pair together by @julienvincent in #81
Full Changelog: v1.1.0...v1.1.1
v1.1.0
What's Changed
- Extend fennel query with missing forms by @julienvincent in #74
- fennel: adds more form queries by @Samy-33 in #75
- Improve native indent impl under some edge cases by @julienvincent in #77
- Add treesitter queries and tests for commonlisp by @julienvincent in #76
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Notable Changes
Fixes
- Try all parts of a compound filetype by @taw10 in #59
- fix: adds
read_cond_lit
treesitter node by @armed in #60 - Refactor test scripts and add to test matrix by @julienvincent in #64
- Fix B/W overflow error in operator pending mode by @julienvincent in #65
- Re-enable nightly channel in test matrix by @julienvincent in #66
Features
- Pairwise dragging by @julienvincent in #67
- Rewrite core on top of treesitter queries by @julienvincent in #71
- Add fennel support by @julienvincent in #72
- Add scheme support by @julienvincent in #73
Misc
- Revamp documentation by @julienvincent in #68
- Update extension docs on adding pairwise queries by @julienvincent in #69
- Replace local assets with links by @julienvincent in #70
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:
- https://github.com/ekaitz-zarraga/nvim-paredit-scheme
- https://github.com/julienvincent/nvim-paredit-fennel
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
Full Changelog: v0.11.0...v1.0.0
v0.11.0
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
- @Samy-33 made their first contribution in #38
- @rafaeldelboni made their first contribution in #44
- @ekaitz-zarraga made their first contribution in #50
- @NoahTheDuke made their first contribution in #55
Full Changelog: v0.10.0...v0.11.0
0.10.0
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
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
ornil
.
0.8.0
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 bindingsae
andie
have been added by to the defaults
0.7.0
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
ory2B
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
- 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
v0.5.2 Ensure default config options are applied