A modularised version of this reddit post by u/ddmenddes_ - all credit goes to the original author!
{
"roobert/fs-string-toggle.nvim",
config = function()
require("fs-string-toggle").setup({
key_binding = "<leader>f"
})
end,
}
Within a string press leader-f to toggle if it's an f-string or not.