[X] Have you read through :h nvim-surround to see if there might be any relevant information there?
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:
lspconfig with sumneko_lua
tree-sitter
this config for plugin:
require('nvim-surround').setup({
indent_lines = function(start, stop)
local b = vim.bo
-- Only re-indent the selection if a formatter is set up already
if start <= stop and (b.equalprg ~= "" or b.indentexpr ~= "" or b.cindent or b.smartindent or b.lisp) then
vim.cmd(string.format("silent normal! %dG=%dG", start, stop))
vim.cmd("echo 'did it'")
end
vim.cmd("echo 'did it again'")
end,
})
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.
Checklist
:h nvim-surround
to see if there might be any relevant information there?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.