Add/change/delete surrounding delimiter pairs with ease. Written with in Lua.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 1 year ago
Note: The majority of this document is auto-generated, and I don't fully remember if anything else has changed in the diff since v1.0.0. If you notice anything missing, please open an issue and I can add it here!
get_char
has been moved from utils
to input
.get_delimiters
has been moved from utils
to config
.textobject
field for config.get_selection
has been deprecated; please use motion
instead. See this comment.
textobject
key, i.e. (
→ a(
NvimSurroundHighlightTextObject
to NvimSurroundHighlight
. See this comment.invalid_key_behavior
handlers will be activated for control characters that don't have defined surrounds
. In other words, <C-a>
is now a valid input that can be passed to invalid_key_behavior
. See this comment.
<C-c>
is still invalid, and terminates the input.node
field to config.get_selection
, allowing users to retrieve selections based on treesitter nodes.indent_lines
field to setup
, allowing users to configure what indentation program should be used for certain line-wise surrounds (if any).<Plug>
mappings; decouple mappings. (af10059)exclude
key to config.get_selections
. (e2c22a6)<Plug>(nvim-surround-insert)
mapping. (#176) (6b45fbf)reset_cursor
semantics. (a207e3b)|nil
from ?
. (1ac5abf)getchar
. (#170) (1f79449)add
, resolves #191. (d51d554)remap = true
from keymaps. (#219) (89c82e7)line_mode
parameter when possible. (#194) (ad56e62)vim.o.selection='exclusive'
. (#158) (81f672a)Sorry for the long time in between releases everybody, I thought I could implement queries support in a sensible way in a short amount of time, but it quickly became much more to handle than I had thought. Moving forwards, I aim to make the plugin "more stable" and to improve the user experience:
false
, but could still use some workThanks again to everyone for using this!
Published by kylechui about 2 years ago
This marks the first official release of nvim-surround
! 🎉
As of right now, nvim-surround
uses built-in Vim text-objects or Lua patterns to find the "parent selection" that contains a surrounding pair. I intend on expanding this ideology to Tree-sitter nodes as well, so things can be run properly, even if nvim-treesitter-textobjects
is not installed.
Massive thanks goes out to everybody that's helped me out with feedback and ideas on how to design this plugin, especially those that have submitted PRs. Also thanks to everybody that's filed a feature request or bug report.
Thanks for using nvim-surround
, I hope it's as much of a joy to use as it is for me to write 💖