Closed smjonas closed 2 years ago
Hi, This would change the current behaviour, although actually be useful.
Running your code there are failing tests, on line 87 you check the length of the match result, but this could be nil, so needs some safety checks there.
As this changes current behaviour, this should be wrapped in a config value, that defaults to "false". i.e. opt-in
With those changes then we can merge.
Hey, thanks for the feedback. I'm not interested in finishing this PR anymore :smile: If you or someone else wants to finish it feel free to reopen and use my code :)
Before this change the following line could not be uncommented in a Lua file (even though it is a commented line) because the commentstring for Lua files is
--%s
:After this change the line will be uncommented to
local fn = vim.fn
, as expected.Let me know if you would prefer a setting for this behavior instead that users can opt-out from.