kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
2.98k stars 60 forks source link

Indentation doesn't get applied on yS #184

Closed Mikilio closed 1 year ago

Mikilio commented 1 year ago

Checklist

Neovim Version

NVIM v0.8.

Plugin Version

Tagged (Stable)

Minimal Configuration

My config is in nix and I don't want to rewrite it. Please let me know if you need it. The relevant points in my config are:

Indentation is set by filetype.lua

Sample Buffer

any file with a recognized filetype

Keystroke Sequence

ySS -- [on any line] ySa({ -- [on any (...) block] etc ...

Expected behavior

'='-indentation should apply

Actual behavior

no indentation is applied at all

Additional context

I added the upper config for some debugging and noticed that my debug messages do not print. The if statement however should be entered because vim.ob.indentexpr is definitely set. I can confirm that ds for example works as intended. My conclusion is that the function specified in indent_line probably doesn't run.

If this has already been fixed in a newer version I shall make a pull request to upgrade the nixpkg.