Closed reyniersbram closed 1 year ago
Hey!
I tried this out myself too and couldn't get it to work with the Lua multiline strings either:
require('Comment').setup {
pre_hook = function()
return [=[--[[
%s
]]]=]
end,
}
I think that this plugin can't do much about this though since the commenting plugin needs to handle the commentstring
with new lines.
I found this issue in Comment.nvim that might be similar to your use case: https://github.com/numToStr/Comment.nvim/issues/38 Maybe this helps?
But you could open an issue/feature request in the Comment.nvim repo since I don't think we could do anything about this in this plugin.
Let me know how it goes!
I want my block comments for
lua
to be like this:So I thought it would be easy to just do something like this:
but when commenting a block of code with Comment.nvim the newlines are replaced by spaces.
Am I doing something wrong, or is it just not possible to have newlines in a commentstring.
This is a link to the specific code in my dotfiles repo.